home *** CD-ROM | disk | FTP | other *** search
/ ASP Advantage 1994 2nd Q2 / The Association of Shareware Professionals - The Official ASP Advantage (2nd Quarter)(1994).bin / files / graphics / cimage / cimage.doc < prev    next >
Encoding:
Text File  |  1993-07-28  |  124.1 KB  |  4,779 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.                               The Complete Image v3.11
  17.  
  18.                            Copyright 1993, Paul D. Nettle
  19.  
  20.  
  21.                                  _______
  22.                             ____|__     |                (R)
  23.                          --|       |    |-------------------
  24.                            |   ____|__  |  Association of
  25.                            |  |       |_|  Shareware
  26.                            |__|   o   |    Professionals
  27.                          -----|   |   |---------------------
  28.                               |___|___|    MEMBER
  29.  
  30.  
  31.                            Document dated:  July 28, 1993
  32.  
  33.                                    Paul D. Nettle
  34.                                  9668 Washington St.
  35.                                   Romulus, MI 48174
  36.                                    (313) 941-9223
  37.  
  38.                                    Author's name:  Paul D. Nettle
  39.                           Author's Compuserve ID:  72163,2442
  40.  
  41.                   This document also Copyright 1993, Paul D. Nettle
  42.  
  43.             A limited license is granted to reprint short extracts  from
  44.             this document  as  long as  credit  is given  to  the  above
  45.             mentioned party.   Individuals,  BBSs  and User  Groups  may
  46.             distribute copies of this  software, it's documentation  and
  47.             associated files  (originally  distributed  in  an  archive)
  48.             freely as long as the files remain in-tact, unmodified,  are
  49.             not re-named  and are  not made  part  of some  larger  work
  50.             without the written permission of Paul D. Nettle.  A BBS may
  51.             rearchive the unmodified archived file's contents as long as
  52.             the  resulting  archive  is  named  CIMAGE.ZIP,  CIMAGE.ARC,
  53.             CIMAGE.LZH or CIMAGE.???
  54.  
  55.  
  56.  
  57.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  58.  
  59.  
  60.                                   TABLE OF CONTENTS
  61.  
  62.             Introduction .............................................4
  63.             Ombudsman Statement ......................................5
  64.             Definition of Shareware ..................................5
  65.             Disclaimer - Agreement ...................................6
  66.             Getting Started ..........................................7
  67.             Running CImage for the first time ........................8
  68.             Configuring CImage .......................................11
  69.                  Batch files .........................................11
  70.                  The startup batch file ..............................11
  71.                  Macros ..............................................11
  72.                  Environment variables ...............................12
  73.                  The CImage command line .............................12
  74.                  External programs interface .........................12
  75.                  Help file configuration .............................12
  76.                       Help File Format ...............................12
  77.                  Filter file configuration ...........................13
  78.                  Filter File Format ..................................13
  79.                  Getting CImage to work with your video card .........13
  80.                  Memory configuration ................................14
  81.             Batch Files ..............................................15
  82.             IPI File Format ..........................................17
  83.             Virtual Memory ...........................................18
  84.             Command Reference ........................................20
  85.                  ` (Left single quote) ...............................21
  86.                  : (Colon) ...........................................22
  87.                  ADD .................................................23
  88.                  ASK .................................................24
  89.                  BIN .................................................25
  90.                  BIOSINFO ............................................26
  91.                  BRIGHTEN ............................................27
  92.                  CONV ................................................28
  93.                  CPY .................................................30
  94.                  CRES ................................................31
  95.                  DARKEN ..............................................32
  96.                  DIVIDE ..............................................33
  97.                  ECHO ................................................34
  98.                  EXIT ................................................35
  99.                  FADE ................................................36
  100.                  FILL ................................................37
  101.                  FILTERFILE ..........................................38
  102.                  FLIP ................................................39
  103.                  FREE ................................................40
  104.                  GAMMA ...............................................41
  105.                  GAMV ................................................42
  106.                  GOTO ................................................43
  107.                  GREYSCALE ...........................................44
  108.                  IF ..................................................45
  109.                  LB ..................................................46
  110.                  LC ..................................................47
  111.                  LOAD ................................................48
  112.                  MACRO ...............................................49
  113.                  MEM .................................................51
  114.  
  115.  
  116.                                        Page 2
  117.  
  118.  
  119.  
  120.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  121.  
  122.  
  123.                  MERGE ...............................................52
  124.                  MULTIPLY ............................................53
  125.                  NEGATE ..............................................54
  126.                  NOISE ...............................................55
  127.                  NORMALIZE ...........................................56
  128.                  OVERLAY .............................................57
  129.                  PAUSE ...............................................58
  130.                  PERCENT .............................................59
  131.                  PIX .................................................60
  132.                  PLASMA ..............................................61
  133.                  PMOD ................................................62
  134.                  REM .................................................63
  135.                  SAVE ................................................64
  136.                  SET .................................................65
  137.                  SHOW ................................................66
  138.                  SUBTRACT ............................................67
  139.                  TERRAIN .............................................68
  140.                  VCOLORS .............................................69
  141.                  VESAINFO ............................................70
  142.                  VMODE ...............................................72
  143.             Future Enhancements ......................................74
  144.             Contacting Customer Support ..............................75
  145.             Ordering Information .....................................76
  146.                  What you will get when you register .................76
  147.                  Differences between non-registered and registered
  148.                  users ...............................................76
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.                                        Page 3
  180.  
  181.  
  182.  
  183.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  184.  
  185.  
  186.                                     INTRODUCTION
  187.  
  188.  
  189.             Thank you for choosing  "The Complete Image."   I hope  that
  190.             this product will be as useful for you as it was fun for  me
  191.             to write.  I'll try to keep this document from being dry, so
  192.             forgive me if the jokes get bad.
  193.  
  194.             To use  CImage,  you  will  be  expected  to  have  a  basic
  195.             understanding of DOS.  Having  a basic understanding of  DOS
  196.             batch  files  and   environment  variables   will  help   in
  197.             understanding CImage equivalents.
  198.  
  199.             CImage also requires at least a 386.  A math co-processor is
  200.             optional, but recommended.  2MB  of memory is also  required
  201.             (although 4 is better, and any more is just great).
  202.  
  203.             From now on "The  Complete Image" will  be known as  CImage.
  204.             (I like to pronounce it "simage").
  205.  
  206.             CImage is a full-featured image processor.  Take a look:
  207.  
  208.                  o  Reads and writes GIF, IMG, TGA, BMP and IPI image
  209.                     files.
  210.  
  211.                  o  An interface for external programs to perform tasks
  212.                     that CImage doesn't already perform via the IPI
  213.                     file format -- explained later in this document.
  214.  
  215.                  o  Very extensive on-line help.  The help file is a
  216.                     simple ASCII text file so that you may modify it to
  217.                     add your external programs, batch files, macros and
  218.                     whatever else you may want information on.
  219.  
  220.                  o  Batch files, Macros, Environment variables
  221.                     (separate from DOS's) that allow complete
  222.                     customization of CImage.
  223.  
  224.                  o  Image arithmetic functions (adding, subtracting,
  225.                     multiplying and dividing images).
  226.  
  227.                  o  Filters, filters filters... Count them up, and you
  228.                     have over 100 filters!  The filters are defined in
  229.                     an ASCII text file, so you can add your own.
  230.  
  231.                  o  Works on ALL video cards.  VESA compatibility with
  232.                     versions up to 1.2 VBE.  You have the choice of the
  233.                     built-in 256 color drivers, VESA, or BIOS.
  234.  
  235.                  o  Memory.  CImage uses ALL available memory by
  236.                     running in protected mode.  If you need more
  237.                     memory, you can turn on the Virtual Memory.
  238.  
  239.             I hope you enjoy using CIMAGE!
  240.  
  241.  
  242.                                        Page 4
  243.  
  244.  
  245.  
  246.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  247.  
  248.  
  249.             OMBUDSMAN STATEMENT
  250.  
  251.             This program is produced by a member of the Association of
  252.             Shareware Professionals (ASP).  ASP wants to make sure that
  253.             the Shareware principle works for you. If you are unable to
  254.             resolve a Shareware-related problem with an ASP member by
  255.             contacting the member directly, ASP may be able to help. The
  256.             ASP Ombudsman can help you resolve a dispute or problem with
  257.             an ASP member, but does not provide technical support for
  258.             members' products.  Please write to the ASP Ombudsman at 545
  259.             Grover Road, Muskegon, MI 49442-9427 USA, FAX 616-788-2765
  260.             or send a Compuserve message via CompuServe Mail to ASP
  261.             Ombudsman 70007,3536.
  262.  
  263.             DEFINITION OF SHAREWARE
  264.  
  265.             Shareware distribution gives users a chance to try  software
  266.             before buying  it.  If  you  try  a  Shareware  program  and
  267.             continue using it, you are expected to register.  Individual
  268.             programs differ  on  details --  some  request  registration
  269.             while others  require  it,  some  specify  a  maximum  trial
  270.             period. With registration, you get anything from the  simple
  271.             right to continue using the  software to an updated  program
  272.             with printed manual.
  273.  
  274.             Copyright  laws  apply  to  both  Shareware  and  commercial
  275.             software, and the copyright holder retains all rights,  with
  276.             a few specific exceptions as stated below. Shareware authors
  277.             are accomplished programmers, just like commercial  authors,
  278.             and the programs are of comparable quality. (In both  cases,
  279.             there are good programs and  bad ones!) The main  difference
  280.             is in the  method of distribution.  The author  specifically
  281.             grants the right to copy and distribute the software, either
  282.             to all and sundry or to a specific group. For example,  some
  283.             authors require written permission before a commercial  disk
  284.             vendor may copy their Shareware.
  285.  
  286.             Shareware is a distribution method, not a type of  software.
  287.             You  should  find  software   that  suits  your  needs   and
  288.             pocketbook,  whether  it's  commercial  or  Shareware.   The
  289.             Shareware system makes  fitting your  needs easier,  because
  290.             you can try  before you buy.   And because  the overhead  is
  291.             low, prices are low also. Shareware has the ultimate  money-
  292.             back guarantee -- if  you don't use  the product, you  don't
  293.             pay for it.
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.                                        Page 5
  306.  
  307.  
  308.  
  309.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  310.  
  311.  
  312.             DISCLAIMER - AGREEMENT
  313.  
  314.             Users of The Complete Image  must accept this disclaimer  of
  315.             warranty:   "The Complete  Image is  supplied  as is.    The
  316.             author  disclaims  all  warranties,  expressed  or  implied,
  317.             including,   without   limitation,    the   warranties    of
  318.             merchantability and of fitness  for any purpose. The  author
  319.             assumes no liability for  damages, direct or  consequential,
  320.             which may result from the use of The Complete Image."
  321.  
  322.             The Complete Image is a "Shareware program" and is  provided
  323.             at no charge to the user for evaluation.  Feel free to share
  324.             it with your friends, but please do not give it away altered
  325.             or as  part  of  another system.    The  essence  of  "user-
  326.             supported" software is  to provide  personal computer  users
  327.             with quality  software  without  high  prices,  and  yet  to
  328.             provide incentive for programmers to continue to develop new
  329.             products.  If you find this program useful and find that you
  330.             are using  The  Complete  Image  and  continue  to  use  The
  331.             Complete Image  after a  reasonable trial  period, you  must
  332.             make a registration payment of 35.00 to Paul D. Nettle.  The
  333.             35.00 registration fee will license one copy for use on  any
  334.             one computer at any one time.  You must treat this  software
  335.             just like a book.  An  example is that this software may  be
  336.             used by any number  of people and may  be freely moved  from
  337.             one computer location  to another, so  long as  there is  no
  338.             possibility of  it being  used at  one location  while  it's
  339.             being used at another.  Just as a book cannot be read by two
  340.             different persons at the same time.
  341.  
  342.             Commercial users of The Complete Image must register and pay
  343.             for their copies  of The Complete  Image within  30 days  of
  344.             first use  or  their  license is  withdrawn.    Site-License
  345.             arrangements may be made by contacting Paul D. Nettle.
  346.  
  347.             Anyone distributing  The  Complete  Image for  any  kind  of
  348.             remuneration must  first  contact  Paul  D.  Nettle  at  the
  349.             address above for authorization.  This authorization will be
  350.             automatically granted  to  distributors  recognized  by  the
  351.             (ASP)  as   adhering  to   its  guidelines   for   Shareware
  352.             distributors, and such distributors  may begin offering  The
  353.             Complete Image  immediately  (However Paul  D.  Nettle  must
  354.             still be advised so that the distributor can be kept  up-to-
  355.             date with the latest version of The Complete Image.).
  356.  
  357.             You are  encouraged to  pass a  copy of  The Complete  Image
  358.             along to your friends for evaluation.  Please encourage them
  359.             to register their copy  if they find that  they can use  it.
  360.             All registered  users  will receive  a  copy of  the  latest
  361.             version of The Complete Image system.
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.                                        Page 6
  369.  
  370.  
  371.  
  372.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  373.  
  374.  
  375.  
  376.                                    GETTING STARTED
  377.  
  378.  
  379.             CImage is ready to run.  All you have to do is install it.
  380.  
  381.             Installation is simple.   Since  you've probably  downloaded
  382.             the CImage archive and un-archived  it (which you needed  to
  383.             do to be reading this document) you're already set to go.
  384.  
  385.             To run  CImage,  you  need  to  have  both,  CIMAGE.EXE  and
  386.             DOS4GW.EXE in your path or in the current directory when you
  387.             run it.  To run it, just type CIMAGE.
  388.  
  389.             If you're like me, you may  already have a very large  path,
  390.             and wish not  to make  it larger.   Where there  is a  will,
  391.             there is a way!  Simply create a batch file that runs CImage
  392.             in the following way:
  393.  
  394.             C:\CIMAGE\DOS4GW C:\CIMAGE\CIMAGE %1 %2 %3 %4 %5 %6 %7 %8 %9
  395.  
  396.             This batch file runs DOS/4GW from the CIMAGE directory,  and
  397.             tells it to run CIMAGE from the same directory.  If you just
  398.             run CIMAGE, then it will not find the DOS Extender (which is
  399.             what it tries to do if you  just run CIMAGE).  So, you  need
  400.             to run the DOS Extender manually.
  401.  
  402.             This works  great because  CImage will  look for  all  batch
  403.             files and  the  filter  files in  the  directory  where  the
  404.             CIMAGE.EXE file is  located (if they  aren't first found  in
  405.             the current directory).
  406.  
  407.             Just place  that  batch file  someplace  in your  path,  and
  408.             you're all set to go!
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.                                        Page 7
  432.  
  433.  
  434.  
  435.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  436.  
  437.  
  438.                           RUNNING CIMAGE FOR THE FIRST TIME
  439.  
  440.             Run CImage by typing CIMAGE (or whatever you named the batch
  441.             file you  may  have created  as  explained in  the  previous
  442.             section).  Note  that if you  run out of  memory during  the
  443.             following examples, you will  need to enable Virtual  Memory
  444.             (see the section  titled VIRTUAL  MEMORY).   If your  system
  445.             only has 4MB, I suggest that  you do this now.  CImage  does
  446.             require a lot of memory.
  447.  
  448.             You will see your DOS prompt.   Notice the small  underscore
  449.             to the  left of  your prompt;  this  is called  the  "Prompt
  450.             modifier".  That's so you know  you're running CIMAGE.   You
  451.             can change it with the PMOD command.
  452.  
  453.             Try loading the Demo image that is included by typing:
  454.                  LOAD DEMO.IPI
  455.  
  456.             As soon  as you  pressed return,  CImage began  loading  the
  457.             image into  the  first available  buffer  (number 0  --  the
  458.             second buffer is number 1, and so on), showing you a percent
  459.             complete as it loads.  Sometimes the percents may not  quite
  460.             reach %100.  This  is just a simple  side effect of  integer
  461.             math.  Don't worry, if you got a prompt again, then you have
  462.             completely loaded  the  image.   Typing  LB  will  list  the
  463.             buffers in  use, and  DEMO.IPI should  be included  in  this
  464.             list.  If  not, you should  have received  an error  message
  465.             during the load.
  466.  
  467.             Next, show it by typing:
  468.                  SHOW
  469.  
  470.             Since the  SHOW  command  has  an  optional  parameter  (for
  471.             specifying which buffer to show) which  was left out in  the
  472.             above example, the SHOW command just shows the first  buffer
  473.             it runs across.
  474.  
  475.             When the image is completely displayed, you'll hear a  short
  476.             beep.  That beep is to  remind you that pressing a key  will
  477.             take you  back to  the command  prompt.   When  you're  done
  478.             trying to find this VERY DIM image, press a key.
  479.  
  480.             This demo image is  VERY dim...so dim  that you monitor  may
  481.             not even be  able to display  it (even  with the  brightness
  482.             turned all the way up!).  The colors are there, though,  and
  483.             I can  prove  it  to  you.   This  image  needs  a  contrast
  484.             enhancement.    So,  we   use  the  normalization   command:
  485.             NORMALIZE.  Try typing:
  486.  
  487.                  HELP NORMALIZE
  488.  
  489.             You should  have  received  a  screen  full  of  information
  490.             specific to the  NORMALIZE command.   Notice at the  bottom,
  491.             there is a SHORTCUT heading.  This means that by typing NORM
  492.  
  493.  
  494.                                        Page 8
  495.  
  496.  
  497.  
  498.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  499.  
  500.  
  501.             alone (rather  than  NORMALIZE)  you can  perform  the  same
  502.             function.  Try it:
  503.  
  504.                  NORM 0
  505.  
  506.             The Normalization  command  will  place the  output  of  the
  507.             normalization into  the  input  buffer unless  you  tell  it
  508.             otherwise (see NORM).  Once the NORM command has  completed,
  509.             you can  show  it  again (the  result  has  overwritten  the
  510.             original image  located in  buffer 0,  so, again,  we  still
  511.             don't need to tell show where to find our image):
  512.  
  513.                  SHOW
  514.  
  515.             Now, isn't that  better?  CImage  didn't create any  colors.
  516.             Those color were all present in that dim image, CImage  just
  517.             enhanced it for you.
  518.  
  519.             Image processing plays a bigger  role in everyday life  than
  520.             you may think.   Did you  know that when  an X-ray is  taken
  521.             using 1/4 the normal power (radiation), that the X-Ray comes
  522.             out looking black,  but that  all the  information is  still
  523.             present?  Just  like that  demo image  you just  normalized.
  524.             Some doctors will  actually take  your X-Ray  at 1/4  power,
  525.             then digitize the X-Ray so that they can perform a  contrast
  526.             Normalization on it to view it.   This way, you are  exposed
  527.             to fewer rays of  radiation, and you  can feel better  about
  528.             your health!
  529.  
  530.             Back to the  tour.   Before we  do anything  to this  image,
  531.             let's save it.   You can  save the contents  of buffer 0  by
  532.             typing:
  533.  
  534.                  SAVE 0 PICTURE.IPI
  535.  
  536.             You can use another file format  if you want.  To specify  a
  537.             different file  format, just  change  the extension  on  the
  538.             filename to TGA, GIF, BMP or IMG.
  539.  
  540.             Lets try a filter:
  541.  
  542.                  CONV LAPLAS3 0
  543.  
  544.             This causes  CImage  to  run  a  convolution  filter  called
  545.             "LAPLAS3" (located in the CIMAGE.FLT file) on our buffer.
  546.  
  547.             There are two  buffers in  memory now.   To  see the  second
  548.             buffer (buffer 1) use the following command:
  549.                  SHOW 1
  550.  
  551.             To see how much  memory you have  available, just type  MEM.
  552.             It lists the largest available memory block, and how much of
  553.             that memory  is virtual,  or, disk-based  memory  (explained
  554.             later).
  555.  
  556.  
  557.                                        Page 9
  558.  
  559.  
  560.  
  561.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  562.  
  563.  
  564.  
  565.             To free up all buffers, just type:
  566.                  FREE ALL
  567.  
  568.             This will release the buffers from memory.  If you have 4MB,
  569.             8MB or more, you won't need to  do this very often.  By  the
  570.             way, exiting CImage will automatically free all buffers.
  571.  
  572.             To quit CImage, just type:
  573.                  EXIT
  574.  
  575.             A shortcut for this  command is Q.   A lot of commands  have
  576.             shortcuts, don't forget to check out the help file for these
  577.             shortcuts.
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.                                        Page 10
  621.  
  622.  
  623.  
  624.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  625.  
  626.  
  627.                                  CONFIGURING CIMAGE
  628.  
  629.  
  630.             CImage is very configurable.  This section will explain  how
  631.             to configure CImage for your needs.
  632.  
  633.             Batch files:
  634.                  As I'm sure you already know,  batch files are a  great
  635.                  tool in DOS.  The same goes for CImage.
  636.  
  637.                  When you create batch files for CImage that you  always
  638.                  want available, place them  in the same directory  that
  639.                  you placed the CIMAGE.EXE  file.  When  you try to  run
  640.                  the batch  file,  if  it isn't  found  in  the  current
  641.                  directory, then CImage  looks for it  in the  directory
  642.                  where CImage was run from.   If you place a batch  file
  643.                  of the  same name  in the  current directory,  it  will
  644.                  override the one located in the CImage directory.   You
  645.                  may find this useful.
  646.  
  647.                  During  Startup,  CImage  will   attempt  to  run   the
  648.                  AUTOEXEC.IPB  file  (following   the  same  rules   for
  649.                  locating this file as all other batch files.)
  650.  
  651.             The startup batch file:
  652.                  As mentioned  above, CImage  will  attempt to  run  the
  653.                  AUTOEXEC.IPB batch file when it  starts.  This file  is
  654.                  no different than any other batch file.  Here's a  list
  655.                  of good suggestions to place in your AUTOEXEC.IPB file:
  656.  
  657.                       VMODE        - Set your preferred video mode.
  658.                       VESAINFO     - Configure the video features to use
  659.                                      VESA (if available).
  660.                       BIOSINFO     - Configure the video features to use
  661.                                      the BIOS.
  662.                       CRES         - Set the color resolution for your
  663.                                      video mode.
  664.                       VCOLORS      - Set the number of colors of your
  665.                                      non-standard video mode.
  666.                       PERCENT      - Turn the percentage displays
  667.                                      On/Off.
  668.                       GAMV         - Set the Gamma value of your choice.
  669.                       MACRO        - Set up any shortcut macros.
  670.                       SET          - Configure your environment
  671.                                      variables for image directories and
  672.                                      such.
  673.                       FILTERFILE   - Change the name of the Filter file
  674.                                      (default is CIMAGE.FLT)
  675.  
  676.                  For information on any of the above mentioned commands,
  677.                  just look them up in this document.
  678.  
  679.             Macros:
  680.  
  681.  
  682.  
  683.                                        Page 11
  684.  
  685.  
  686.  
  687.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  688.  
  689.  
  690.                  Macros are a great way to  shortcut a lot of  commands.
  691.                  They allow you to "type" complicated command line tasks
  692.                  with a single keystroke or with a single word.
  693.  
  694.             Environment variables:
  695.                  Environment variables are  great for specifying  paths,
  696.                  batch file  locations,  and  more.    They  are  really
  697.                  intended for  use  in  batch  files  only,  but  you're
  698.                  welcome to use them on  the command line, however,  you
  699.                  may find them to be rather cryptic to type.
  700.  
  701.             The CImage command line:
  702.                  The  CIMAGE.EXE  command  line   accepts  up  to   nine
  703.                  parameters.  These parameters are passed directly  into
  704.                  your AUTOEXEC.IPB.
  705.  
  706.                  You may use this for different startup configurations.
  707.  
  708.             External programs interface:
  709.                  The .IPI file  format was designed  to be the  simplest
  710.                  file format  available  for storing  24-bit  images  of
  711.                  unlimited resolutions.  This is  for those of you  that
  712.                  can program, and would like to add functions to  CImage
  713.                  that it doesn't  already perform.   Here is an  example
  714.                  batch file that takes advantage of this feature:
  715.  
  716.                     SAVE %1 TEMP.IPI
  717.                     FREE %1
  718.                     MYPROG TEMP.IPI
  719.                     LOAD TEMP.IPI %1
  720.                     DEL TEMP.IPI
  721.  
  722.                  This batch file will accept a single parameter for  the
  723.                  buffer  number.    This  buffer  is  then  saved  to  a
  724.                  temporary IPI file.   We will  free the  memory it  was
  725.                  using just  in case  we need  to give  MYPROG.EXE  some
  726.                  memory.  Next, CImage runs MYPROG.EXE from DOS, passing
  727.                  it TEMP.IPI as a parameter.  MYPROG.EXE can do whatever
  728.                  it wants to TEMP.IPI, then when it's done, CImage  will
  729.                  regain control.  Once we're back, we re-LOAD the image,
  730.                  then delete the temporary file.
  731.  
  732.                  If this batch file is  placed in the CImage  directory,
  733.                  then this function is available just as if it was built
  734.                  into CImage!
  735.  
  736.             Help file configuration:
  737.                  The CIMAGE.HLP  file is  a simple  ASCII file  full  of
  738.                  "topics" that are available on-line.  If you decide  to
  739.                  add external programs,  macros, or  whatever else,  you
  740.                  can add these as topics to  the help file.  The  format
  741.                  is quite simple:
  742.  
  743.                  Help File Format:
  744.  
  745.  
  746.                                        Page 12
  747.  
  748.  
  749.  
  750.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  751.  
  752.  
  753.                       1.  If the first non-space character on a line  is
  754.                           a semicolon,  then that  line is  ignored ("a
  755.                           comment").
  756.  
  757.                       2.  Topics  must begin with  a :  (colon) and  the
  758.                           colon must be placed in very  first column on
  759.                           the line.  No spaces may  be contained in the
  760.                           topic, and it must be followed by a new-line.
  761.                           (":DEMO" -- this is called a  "tag") will get
  762.                           help for  the  topic  "DEMO".    CImage  will
  763.                           display all  information after  the specified
  764.                           topic's tag until the next tag is found.
  765.  
  766.             Filter file configuration:
  767.                  CImage has many filters (the most I've ever seen in one
  768.                  place.)  The filters are defined in the file CIMAGE.FLT
  769.                  (or  whatever  you  may   have  renamed  it  with   the
  770.                  FILTERFILE command).  You may  modify this file as  you
  771.                  wish, adding or removing filters  (not that there is  a
  772.                  reason for  removing them)  at  your discretion.    The
  773.                  format is quite simple:
  774.  
  775.                  Filter File Format:
  776.                       1.  If the first non-space character on a line  is
  777.                           a semicolon,  then that  line is  ignored ("a
  778.                           comment").
  779.  
  780.                       2.  Filters are defined in the following way:
  781.  
  782.                       FILTER <filtername> <size>
  783.                       <upper-left>  <upper-center>  <upper-right>
  784.                       <center-left> <center-center> <center-right>
  785.                       <lower-left>  <lower-center>  <lower-right>
  786.                       <operator> <operand> <bias>
  787.  
  788.                       Where <filtername>  is  the name  of  the  filter.
  789.                       This is  where CONV  looks  for the  command  line
  790.                       option <filter>.  <size> is the size of the filter
  791.                       (3, 5 or 7 only, others are ignored).  For 5x5 and
  792.                       7x7 filters,  the  above  example  is  incomplete,
  793.                       since from <upper-left> to <lower-right> would  be
  794.                       a 5x5 or 7x7 "grid".
  795.  
  796.             Getting CImage to work with your video card:
  797.                  You have many options for getting CImage to work with
  798.                  your video card.  Just use the VMODE command to set the
  799.                  type of video interface you want to use.
  800.  
  801.                  First, try VESA.  It's the fastest, and allows more
  802.                  than 256 colors, if your card can handle it.  See the
  803.                  VESAINFO command for more information.
  804.  
  805.                  Example:
  806.                     VMODE VESA
  807.  
  808.  
  809.                                        Page 13
  810.  
  811.  
  812.  
  813.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  814.  
  815.  
  816.                     VESAINFO 101
  817.  
  818.                  If you don't have VESA capabilities, then you will
  819.                  probably want to use the built-in super-VGA drivers.
  820.                  See the VMODE command for more information on
  821.                  configuring the video mode.
  822.  
  823.                  Example:
  824.                     VMODE 13
  825.  
  826.                  If you have a really weird video card, then you may
  827.                  have to use the BIOS setting.  See the BIOSINFO command
  828.                  for more information on configuring the BIOS setting.
  829.  
  830.                  Example:
  831.                     VMODE BIOS
  832.                     BIOSINFO 0x5F 640 480
  833.  
  834.                  You may also need to set the CRES or VCOLORS to your
  835.                  video card's specified settings.
  836.  
  837.             Memory configuration:
  838.  
  839.                  CImage uses  the  DOS/4GW DOS  Extender  from  Rational
  840.                  Systems.   This DOS  Extender places  CImage into  "386
  841.                  Flat Model"  protected mode  where the  80386  executes
  842.                  instructions faster, and has  access to LOTS of  larger
  843.                  chunks of memory.  With access  to all of this  memory,
  844.                  CImage can  run faster,  and perform  more  complicated
  845.                  tasks than it  would if it  were written for  a 286  or
  846.                  less processor.
  847.  
  848.                  Lets assume you have 8 MEG.  CImage loads above the
  849.                  first MEG (this is where most systems keep their faster
  850.                  memory).  As memory is needed, CImage gets it from the
  851.                  memory above that first MEG.  If that runs out, then
  852.                  CImage starts looking for memory in the DOS 640K area.
  853.                  DOS's memory is used last because it is usually slower,
  854.                  and also because CImage can run DOS programs, so you
  855.                  will want to save as much DOS memory as possible.
  856.                  Virtual Memory (VMM) is also available (see VIRTUAL
  857.                  MEMORY).
  858.  
  859.                  Note that programs that use Extended or Expanded memory
  860.                  (like Disk Cache programs) will take memory away from
  861.                  CImage.  You may want to limit the memory that they use
  862.                  to allow a comfortable amount for both.
  863.  
  864.  
  865.  
  866.  
  867.  
  868.  
  869.  
  870.  
  871.  
  872.                                        Page 14
  873.  
  874.  
  875.  
  876.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  877.  
  878.  
  879.                                      BATCH FILES
  880.  
  881.             DESCRIPTION:
  882.                  Batch files are used for  running a series of  commands
  883.                  in a specific order saving  you the trouble of  running
  884.                  them manually; just  as if the  user were  to type  the
  885.                  commands at the command line.
  886.  
  887.                  If you are  familiar with DOS  batch programming,  then
  888.                  you will have  no problem adjusting  to CImage's  batch
  889.                  programming,  since   CImage   uses  the   exact   same
  890.                  techniques as DOS with the following exceptions:
  891.  
  892.                      1. Currently,  CImage  does  not  support  the  FOR
  893.                          command
  894.                      2. There  is  an  ASK command  that  DOS  does  not
  895.                          support.  See the ASK command for more help.
  896.                      3. Currently, ERRORLEVEL  is only  valid after  the
  897.                          ASK command.  Return  codes  from DOS  are  not
  898.                          available in CImage,  and CImage does  not need
  899.                          return codes for it's commands.
  900.                      4. CImage's  batch files  are named  with the  .IPB
  901.                          file extension rather  than the  .BAT extension
  902.                          used by DOS.
  903.                      5. Batch  files  must  be located  in  the  current
  904.                          directory, CImage does not search the path.  If
  905.                          the .IPB file is  still not found,  then CImage
  906.                          will search for the .IPB file  in the directory
  907.                          in which CImage was originally run.
  908.  
  909.                  As in DOS, there are nine  batch parameters (%1 -  %9).
  910.                  These are used for interpreting parameters passed  into
  911.                  the batch file  when it is  run. for example,  consider
  912.                  the batch file (called LOADSHOW.IPB):
  913.  
  914.                     LOAD %1 %2
  915.  
  916.                     SHOW %2
  917.  
  918.                  When LOADSHOW is run:
  919.  
  920.                     LOADSHOW PICTURE.GIF 0
  921.  
  922.                  will interpret as the following:
  923.  
  924.                     LOAD PICTURE.GIF 0
  925.                     SHOW 0
  926.  
  927.             NOTES:
  928.                  At startup CImage will  execute the AUTOEXEC.IPB  batch
  929.                  file.  Parameters may  be passed into the  AUTOEXEC.IPB
  930.                  file  when  CImage  is  run.    For  example,   "CImage
  931.                  PICTURE.GIF" will run "AUTOEXEC PICTURE.GIF".  This  is
  932.  
  933.  
  934.  
  935.                                        Page 15
  936.  
  937.  
  938.  
  939.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  940.  
  941.  
  942.                  useful  for  running   different  configurations,   for
  943.                  example.
  944.  
  945.                  The only place in CImage where the break key makes  any
  946.                  difference is in batch  files.  When  the break key  is
  947.                  pressed, the  current command  will not  stop, it  will
  948.                  finish, but when CImage goes to the batch file to  find
  949.                  the next command, it  will then ask  to exit the  batch
  950.                  file or to continue running it.
  951.  
  952.             SEE ALSO:
  953.                  ASK IF GOTO : REM PAUSE ECHO
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.                                        Page 16
  999.  
  1000.  
  1001.  
  1002.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  1003.  
  1004.  
  1005.                                    IPI FILE FORMAT
  1006.  
  1007.             DESCRIPTION:
  1008.                  The IPI  (pronounced "ipee")  file  format is  used  to
  1009.                  store 24-bit images. This format was designed to be the
  1010.                  simplest to decode for programmers so that they may add
  1011.                  functionality to CImage via external programs.
  1012.  
  1013.                  For example:    A  developer needs  to  use  CImage  to
  1014.                  manipulate some images for his software's title screen.
  1015.                  Assume  the  interface   programs  have  already   been
  1016.                  written.  He runs CImage, and  from CImage he runs  his
  1017.                  program to generate  an image, and  save it  to an  IPI
  1018.                  file.  Now he tells CImage  to load the file, and  does
  1019.                  whatever manipulation he  needs done.   Next, he  saves
  1020.                  the file  in IPI  format.   Lastly, he  runs his  other
  1021.                  interface program to load the  IPI file, do some  final
  1022.                  changes or modifications,  then he saves  the image  in
  1023.                  his own file format.
  1024.  
  1025.                  With the  use  of  batch files,  this  process  can  be
  1026.                  automated.  His second interface program can even erase
  1027.                  the IPI file when it's no  longer needed, so as not  to
  1028.                  clutter up the hard drive.
  1029.  
  1030.                  This prevents the  developer from having  to write  any
  1031.                  GIF encoding or decoding  routines, or having to  learn
  1032.                  an image format that is more complicated than he  would
  1033.                  like.   The IPI  files  are un-compressed,  linear  RGB
  1034.                  format with  a very  small header.   These  files  were
  1035.                  meant to be temporary, so they can be rather large.   A
  1036.                  640x480 image can be over 900K in size.
  1037.  
  1038.                  The IPI format is as follows:
  1039.                     X resolution (WORD - MSB first)
  1040.                     Y resolution (WORD - MSB first)
  1041.                     Image data:
  1042.                        FOR EACH PIXEL IN THE SCREEN (XRES * YRES)
  1043.                        {
  1044.                           Red Element   (BYTE)
  1045.                           Green Element (BYTE)
  1046.                           Blue Element  (BYTE)
  1047.                        }
  1048.  
  1049.             SEE ALSO:
  1050.                  LOAD SAVE MERGE LB
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.                                        Page 17
  1062.  
  1063.  
  1064.  
  1065.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  1066.  
  1067.  
  1068.                                    VIRTUAL MEMORY
  1069.  
  1070.             DESCRIPTION:
  1071.                  CImage was written with the Watcom C/C++32 9.5 and uses
  1072.                  the DOS/4GW DOS Extender  from Rational Systems.   This
  1073.                  royalty-free DOS Extender (DOS4GW.EXE) offers a Virtual
  1074.                  Memory Manager (VMM).  When CImage runs out of  memory,
  1075.                  it can be  configured so that  it automatically  starts
  1076.                  swapping to disk.   In this way,  you can actually  use
  1077.                  more RAM than your computer has!
  1078.  
  1079.                  This configuration  MUST take  place before  CImage  is
  1080.                  run.  If CImage runs out  of memory while running,  you
  1081.                  must  save  what  your  are  doing,  exit  CImage   and
  1082.                  configure for VMM before re-starting CImage.
  1083.  
  1084.                  To enable VMM, you only need  to set a single  environ-
  1085.                  ment variable.   Might  I suggest  that you  create  an
  1086.                  CIMAGE.BAT batch file  that sets  this variable  before
  1087.                  running CImage, then clears it afterwards just in  case
  1088.                  you're  not  one  for  having  all  these   environment
  1089.                  variable hanging  around  when they  aren't  (like  me)
  1090.                  necessary.
  1091.  
  1092.                  I have found a drawback to using the VMM.  It tends  to
  1093.                  slows CImage down dramatically, even when not  swapping
  1094.                  to disk.
  1095.  
  1096.                  To enable VMM with default values, just "SET DOS4GVM=1"
  1097.                  from within  DOS before  entering  CImage.   It's  that
  1098.                  simple.  But, like all other things, there is a way  to
  1099.                  complicate it  by configuring  it (it's  not that  bad,
  1100.                  actually).
  1101.  
  1102.                  Usage:
  1103.                     SET DOS4GVM=[option[#value]] [option[#value]]...
  1104.  
  1105.                  (the '#' is  used with options  that take values  since
  1106.                  the DOS command shell will not accept "=")
  1107.  
  1108.                  Setting the DOS4GVM=1 will  use default values for  all
  1109.                  options.  Here are some control options:
  1110.  
  1111.                  MINMEM         The minimum  amount  of RAM  managed  by
  1112.                                 VMM.  The default is 512K
  1113.                  MAXMEM         The Maximum  amount  of RAM  managed  by
  1114.                                 VMM.  The default is 4MB.
  1115.                  SWAPMIN        The minimum or initial size of the  swap
  1116.                                 file.  If this  option is not used,  the
  1117.                                 size  of  the  swap  file  is  based  on
  1118.                                 VIRTUALSIZE (see below).
  1119.                  SWAPINC        The size by which the swap file grows.
  1120.                  SWAPNAME       The swap file name.  The default name is
  1121.                                 "DOS4GVM.SWP".  By  default the file  is
  1122.  
  1123.  
  1124.                                        Page 18
  1125.  
  1126.  
  1127.  
  1128.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  1129.  
  1130.  
  1131.                                 in the  root  directory of  the  current
  1132.                                 drive.  Specify  the complete path  name
  1133.                                 if you  want to  keep the  swap file  on
  1134.                                 another drive.
  1135.                  DELETESWAP     Whether the  swap file  is deleted  when
  1136.                                 CImage exits.   By default  the file  is
  1137.                                 NOT deleted.  Program startup is quicker
  1138.                                 if the file is NOT deleted.
  1139.                  VIRTUALSIZE    The size  of  the virtual  memory  space
  1140.                                 (swap file plus allocated memory).   The
  1141.                                 default is 16MB.
  1142.  
  1143.                  If you wish to have a temporary swap file, and only use
  1144.                  no more than 4 MEG of RAM, then use the example below:
  1145.  
  1146.                     SET DOS4GVM=DELETESWAP maxmem#8192
  1147.  
  1148.                  NOTE:  This DOS Extender is especially advantageous for
  1149.                  programmers.  I HIGHLY RECOMMEND the Watcom C/C++32 9.5
  1150.                  compiler to  developers.    I own  Borland  C/C++  3.1,
  1151.                  Microsoft C/C++ 7.0, and Watcom C/C++32 9.5.  My choice
  1152.                  development tools are the Watcom Tools (although I hate
  1153.                  to give up the Turbo Debugger).  Take the time to learn
  1154.                  them, they are wonderful!
  1155.  
  1156.             SEE ALSO:
  1157.                  MEM
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.                                        Page 19
  1188.  
  1189.  
  1190.  
  1191.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  1192.  
  1193.  
  1194.                                   COMMAND REFERENCE
  1195.  
  1196.             System level commands:
  1197.                  [EXIT/Q/QUIT] [`] [?/HELP] [REM] [ASK] [PAUSE] [ECHO]
  1198.                  [PERCENT]
  1199.  
  1200.             Batch file processing:
  1201.                  [IF] [IFNOT]
  1202.  
  1203.             Graphic File Manipulation tools:
  1204.                  [LOAD] [SAVE] [MERGE] [TERRain]
  1205.  
  1206.             Buffer Manipulation Tools:
  1207.                  [LB] [FREE] [SHOW] [MEM]
  1208.  
  1209.             Local Environment Variables and Macros:
  1210.                  [VMODE] [VCOLORS] [CRES] [SET] [MACRO] [GAMV]
  1211.                  [BIOSinfo] [VESAinfo]
  1212.  
  1213.             Image Enhancement tools:
  1214.                  [NEGate] [ADD] [SUBtract] [MULTiply] [DIVide]
  1215.                  [BRIghten] [DARKen] [NOISe] [GREYscale] [NORMalize]
  1216.                  [GAMMa] [CONV] [LC] [PIX] [OVERlay] [BIN]
  1217.  
  1218.             Image Manipulation tools:
  1219.                  [FLIP] [CPY]
  1220.  
  1221.             Image Generators:
  1222.                  [FADE] [PLASMA] [FILL]
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.                                        Page 20
  1251.  
  1252.  
  1253.  
  1254.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  1255.  
  1256.  
  1257.             COMMAND:
  1258.                  ` (left single quote)
  1259.  
  1260.             PURPOSE:
  1261.                  Send a  command directly  to DOS  bypassing the  CImage
  1262.                  command processor shell.
  1263.  
  1264.             SYNTAX:
  1265.                  `<command>
  1266.                -or-
  1267.                  ` <command>
  1268.  
  1269.             DESCRIPTION:
  1270.                  This is useful for commands like MEM.  Since DOS has  a
  1271.                  MEM command as well as CImage, you  can only run DOS's
  1272.                  MEM by using the `left single quote'.
  1273.  
  1274.             NOTES:
  1275.                  Another way to perform a similar function is to  create
  1276.                  a DOS batch file that runs MEM called M.BAT.  This  is,
  1277.                  of course, not very practical.
  1278.  
  1279.             SHORTCUT:
  1280.                  None.
  1281.  
  1282.             SEE ALSO:
  1283.                  None.
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.                                        Page 21
  1314.  
  1315.  
  1316.  
  1317.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  1318.  
  1319.  
  1320.  
  1321.             COMMAND:
  1322.                  : (colon)
  1323.  
  1324.             PURPOSE:
  1325.                  The `colon' is used in batch files only for designating
  1326.                  a label.
  1327.  
  1328.             SYNTAX:
  1329.                  :<label>
  1330.  
  1331.             DESCRIPTION:
  1332.                  Labels in Batch files allow the batch file control over
  1333.                  it's flow.
  1334.  
  1335.                  Labels are used in conjunction with the GOTO command to
  1336.                  alter batch program flow.
  1337.  
  1338.             NOTES:
  1339.                  None.
  1340.  
  1341.             SHORTCUT:
  1342.                  None.
  1343.  
  1344.             SEE ALSO:
  1345.                  BATCH ASK IF GOTO REM PAUSE ECHO
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.                                        Page 22
  1377.  
  1378.  
  1379.  
  1380.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  1381.  
  1382.  
  1383.  
  1384.             COMMAND:
  1385.                  ADD
  1386.  
  1387.             PURPOSE:
  1388.                  Add the contents of two image buffers.
  1389.  
  1390.             SYNTAX:
  1391.                  ADD <buf1> <buf2> [outbuf]
  1392.  
  1393.             DESCRIPTION:
  1394.                  ADD will add, pixel by pixel each of the red, blue  and
  1395.                  green components  of <buf1>  and <buf2>  and place  the
  1396.                  result into [outbuf].
  1397.  
  1398.             NOTES:
  1399.                  If [outbuf]  is not  given,  then <buf1>  contains  the
  1400.                  result.
  1401.  
  1402.                  Upon adding the components, if the two components added
  1403.                  are greater  than  255,  then the  component  value  is
  1404.                  clipped to 255.
  1405.  
  1406.             SHORTCUT:
  1407.                  None.
  1408.  
  1409.             SEE ALSO:
  1410.                  SUBTRACT MULTIPLY DIVIDE
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.  
  1417.  
  1418.  
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.                                        Page 23
  1440.  
  1441.  
  1442.  
  1443.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  1444.  
  1445.  
  1446.  
  1447.             COMMAND:
  1448.                  ASK
  1449.  
  1450.             PURPOSE:
  1451.                  ASK allows  users to  input single  keystrokes for  use
  1452.                  within CImage batch files.
  1453.  
  1454.             SYNTAX:
  1455.                  ASK <keylist> <string>
  1456.  
  1457.             DESCRIPTION:
  1458.                  The <keylist> contains all available keys to the  user.
  1459.                  For example, a Yes/No question  will have a keylist  of
  1460.                  `yn'.
  1461.  
  1462.                  The <string> contains the prompt.  This is displayed to
  1463.                  the user while ASK waits for a Key.
  1464.  
  1465.                  When ASK completes, ERRORLEVEL will be set according to
  1466.                  the key that was pressed.  The ERRORLEVEL starts at  1,
  1467.                  for the  first entry  in  the <keylist>  and  continues
  1468.                  until the keylist is complete.   In the above  example,
  1469.                  if the user pressed `y' then the ERRORLEVEL would be 1.
  1470.                  If the user would have pressed `n' then the  ERRORLEVEL
  1471.                  would have been 2.
  1472.  
  1473.             NOTES:
  1474.                  If a  key  not  in  the  <keylist>  was  pressed,  then
  1475.                  ERRORLEVEL is 0.
  1476.  
  1477.             SHORTCUT:
  1478.                  None.
  1479.  
  1480.             SEE ALSO:
  1481.                  BATCH IF
  1482.  
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.                                        Page 24
  1503.  
  1504.  
  1505.  
  1506.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  1507.  
  1508.  
  1509.  
  1510.             COMMAND:
  1511.                  BIN
  1512.  
  1513.             PURPOSE:
  1514.                  Binarize a picture with a given threshold.
  1515.  
  1516.  
  1517.             SYNTAX:
  1518.                  BIN <inbuf> <threshold> [outbuf]
  1519.  
  1520.             DESCRIPTION:
  1521.                  BIN will  compare  each  of the  red,  blue  and  green
  1522.                  components of  <inbuf>  against <threshold>.    If  the
  1523.                  component value  is  less  than  <threshold>  then  the
  1524.                  component value is set to zero.  If the component value
  1525.                  is greater  than  or  equal to  <threshold>,  then  the
  1526.                  component value is set to 255.
  1527.  
  1528.                  Valid range for <threshold> is 0-255.
  1529.  
  1530.             NOTES:
  1531.                  If [outbuf]  is not  given, then  <inbuf> contains  the
  1532.                  result.
  1533.  
  1534.             SHORTCUT:
  1535.                  None.
  1536.  
  1537.             SEE ALSO:
  1538.                  BRIGHTEN DARKEN NORMALIZE GREYSCALE
  1539.  
  1540.  
  1541.  
  1542.  
  1543.  
  1544.  
  1545.  
  1546.  
  1547.  
  1548.  
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.                                        Page 25
  1566.  
  1567.  
  1568.  
  1569.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  1570.  
  1571.  
  1572.  
  1573.             COMMAND:
  1574.                  BIOSINFO
  1575.  
  1576.             PURPOSE:
  1577.                  BIOSINFO  will  set  the  BIOS  graphics  settings  for
  1578.                  CImage.
  1579.  
  1580.             SYNTAX:
  1581.                  BIOSINFO <mode> [xres] [yres]
  1582.  
  1583.             DESCRIPTION:
  1584.                  BIOSINFO will set the current BIOS configuration to  be
  1585.                  used  for  displaying  image  buffers  using  the  SHOW
  1586.                  command.
  1587.  
  1588.                  By setting  the BIOS  settings  in CImage,  CImage  can
  1589.                  access virtually any video card that has BIOS  support.
  1590.                  Consult your video card's user's manual for information
  1591.                  on the BIOS mode and associated resolutions.
  1592.  
  1593.                  [xres] and [yres] may be omitted for quickly  switching
  1594.                  between two  different modes  of the  same  resolution.
  1595.                  Default BIOS resolution is 640x480.  The default number
  1596.                  of colors is 256 (see note below).
  1597.  
  1598.                  The BIOS is incapable of plotting pixels with more than
  1599.                  256 colors, so if the video mode that you are trying to
  1600.                  access has more than 256 colors, you MUST use the  VESA
  1601.                  capabilities.  Consult your video card's user's  manual
  1602.                  for more  information  on  VESA  capabilities  that  it
  1603.                  supports.
  1604.  
  1605.                  Users must also  perform a "VMODE  BIOS" to enable  the
  1606.                  BIOS mode for displaying image buffers.  See the  VMODE
  1607.                  command for more information on setting the mode.
  1608.  
  1609.                  TSRs are  available  to  allow  ALL  video  cards  VESA
  1610.                  support in software. See the VESAINFO command for  more
  1611.                  information on VESA support in CImage.
  1612.  
  1613.             NOTES:
  1614.                  <mode> must be in HEX.
  1615.  
  1616.                  VESA is the preferred graphics configuration to run.
  1617.  
  1618.                  CImage does  not  support  modes  with  less  than  256
  1619.                  colors.
  1620.  
  1621.             SHORTCUT:
  1622.                  BIOS
  1623.  
  1624.             SEE ALSO:
  1625.                  VESAINFO VMODE VCOLORS CRES
  1626.  
  1627.  
  1628.                                        Page 26
  1629.  
  1630.  
  1631.  
  1632.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  1633.  
  1634.  
  1635.  
  1636.             COMMAND:
  1637.                  BRIGHTEN
  1638.  
  1639.             PURPOSE:
  1640.                  Brightens an image buffer.
  1641.  
  1642.             SYNTAX:
  1643.                  BRIGHTEN <amount> <inbuf> [outbuf]
  1644.  
  1645.             DESCRIPTION:
  1646.                  BRIGHTEN will  increase the  brightness of  <inbuf>  by
  1647.                  <amount>.  <amount> is a component value, so the  range
  1648.                  is 1-255.
  1649.  
  1650.             NOTES:
  1651.                  If [outbuf]  is not  given, then  <inbuf> contains  the
  1652.                  result.
  1653.  
  1654.             SHORTCUT:
  1655.                  BRI
  1656.  
  1657.             SEE ALSO:
  1658.                  DARKEN
  1659.  
  1660.  
  1661.  
  1662.  
  1663.  
  1664.  
  1665.  
  1666.  
  1667.  
  1668.  
  1669.  
  1670.  
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.  
  1682.  
  1683.  
  1684.  
  1685.  
  1686.  
  1687.  
  1688.  
  1689.  
  1690.  
  1691.                                        Page 27
  1692.  
  1693.  
  1694.  
  1695.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  1696.  
  1697.  
  1698.  
  1699.             COMMAND:
  1700.                  CONV
  1701.  
  1702.             PURPOSE:
  1703.                  Performs a 3x3, 5x5, or 7x7 convolution filter.
  1704.  
  1705.             SYNTAX:
  1706.                  CONV <filter> <inbuf> [outbuf]
  1707.  
  1708.             DESCRIPTION:
  1709.                  Performs a Convolution filter  (defined as <filter>  in
  1710.                  the filter  file (defined  by the  FILTERFILE  command;
  1711.                  default filename is FILTERS.FLT). file) on <inbuf>  and
  1712.                  places the result into [outbuf].
  1713.  
  1714.                  CONV  perform  "convolution"   filters.     Convolution
  1715.                  filters  are  a  common  way  of  changing  an  image's
  1716.                  appearance.  Some common  filters will blur or  sharpen
  1717.                  an image, others may highlight edges, or remove all  of
  1718.                  the image completely leaving only the edges.
  1719.  
  1720.                  The filters are contained in the filter file.
  1721.  
  1722.                  The Available filters can be obtained with the  command
  1723.                  LC (for  List  Convolutions).   See  HELP LC  for  more
  1724.                  information on the LC command.
  1725.  
  1726.                  The filter description  format for a  3x3 filter is  as
  1727.                  follows:
  1728.                       FILTER <filtername> <size>
  1729.                       <upper-left>  <upper-center>  <upper-right>
  1730.                       <center-left> <center-center> <center-right>
  1731.                       <lower-left>  <lower-center>  <lower-right>
  1732.                       <operator> <operand> <bias>
  1733.  
  1734.                       Any text following semicolons are comments
  1735.  
  1736.                  Where <filtername> is the name of the filter.  This  is
  1737.                  where CONV looks for the command line option  <filter>.
  1738.                  <size> is  the size  of the  filter (3,  5 or  7  only,
  1739.                  others are  ignored).   For 5x5  and 7x7  filters,  the
  1740.                  above example is incomplete, since from <upper-left> to
  1741.                  <lower-right> would be a 5x5 or 7x7 "grid".
  1742.  
  1743.                  Convolutions are quite  simple.  For  each pixel in  an
  1744.                  image, the filter grid is overlaid onto that pixel  and
  1745.                  it's neighbors with the <center-center> element of  the
  1746.                  filter grid  aligned  onto  the current  pixel  in  the
  1747.                  image, and  the  outer  elements  in  the  filter  grid
  1748.                  overlaying the  current pixel's  neighbors.   The  next
  1749.                  step is to  multiply each  element in  the filter  grid
  1750.                  with it's corresponding  overlaid pixel value.     Once
  1751.                  all  these  values  have  been  calculated,  add   them
  1752.  
  1753.  
  1754.                                        Page 28
  1755.  
  1756.  
  1757.  
  1758.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  1759.  
  1760.  
  1761.                  together  and  perform  the  operation  (/  8  for   an
  1762.                  <operator> of '/'  and an <operand>  of '8'.)   Lastly,
  1763.                  add the <bias> value.   If the  addition of <bias>  (or
  1764.                  subtraction of  <bias> if  it  is negative)  takes  the
  1765.                  result above 255 or below 0, then the value is  clipped
  1766.                  to 0 or 255, respectively.
  1767.  
  1768.                  A good trick for trying your  own is to take a  current
  1769.                  filter, copy it, change the new copy's name, and modify
  1770.                  it.   If you  have  problems getting  usable  resulting
  1771.                  images, try adding  all of the  values in the  filter's
  1772.                  grid and  placing  that  value  in  <operand>  with  an
  1773.                  <operator> of '/'
  1774.  
  1775.             NOTES:
  1776.                  The valid range for <bias> is 0-255.
  1777.  
  1778.                  Valid <operator> values are:
  1779.                       +.......Add <operand>
  1780.                       -.......Subtract <operand>
  1781.                       *.......Multiply by  <operand>  /.......Divide  by
  1782.                               <operand>
  1783.                       M.......Sort all multiplied grid elements, and use
  1784.                               the median.  Ignore <operand>  -- Operand
  1785.                               MUST still be present
  1786.                       <.......Sort all multiplied grid elements, and use
  1787.                               the lowest.  Ignore <operand>  -- Operand
  1788.                               MUST still be present
  1789.                       >.......Sort all multiplied grid elements, and use
  1790.                               the highest. Ignore  <operand> -- Operand
  1791.                               MUST still be present
  1792.  
  1793.                  If [outbuf] is  not given,  then CONV  will create  the
  1794.                  first available buffer.
  1795.  
  1796.                  CImage will search for the filter file in the following
  1797.                  order:
  1798.                       1. The current directory
  1799.                       2. The default CImage directory (where  CIMAGE.EXE
  1800.                       is stored)
  1801.  
  1802.                  CAUTION:   The median  ('M'),  dilate ('>')  and  erode
  1803.                  ('<') functions take a LONG TIME in 5x5 or 7x7 filters.
  1804.                  Try  to  stick  with   using  3x3  filters  for   these
  1805.                  operators.
  1806.  
  1807.             SHORTCUT:
  1808.                  None.
  1809.  
  1810.             SEE ALSO:
  1811.                  LC FILTERFILE
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.                                        Page 29
  1818.  
  1819.  
  1820.  
  1821.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  1822.  
  1823.  
  1824.  
  1825.             COMMAND:
  1826.                  CPY
  1827.  
  1828.             PURPOSE:
  1829.                  Copy an image buffer to another.
  1830.  
  1831.             SYNTAX:
  1832.                  CPY <inbuf> [outbuf]
  1833.  
  1834.             DESCRIPTION:
  1835.                  CPY will copy <inbuf> into [outbuf], creating  [outbuf]
  1836.                  in the process. [outbuf] must not exist.
  1837.  
  1838.             NOTES:
  1839.                  If [outbuf]  is not  given, then  CPY will  create  the
  1840.                  first available buffer.
  1841.  
  1842.                  CPY  was   not   named  "COPY"   because   of   obvious
  1843.                  interference with the DOS COPY command.
  1844.  
  1845.             SHORTCUT:
  1846.                  None.
  1847.  
  1848.             SEE ALSO:
  1849.                  None.
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.  
  1856.  
  1857.  
  1858.  
  1859.  
  1860.  
  1861.  
  1862.  
  1863.  
  1864.  
  1865.  
  1866.  
  1867.  
  1868.  
  1869.  
  1870.  
  1871.  
  1872.  
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.                                        Page 30
  1881.  
  1882.  
  1883.  
  1884.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  1885.  
  1886.  
  1887.  
  1888.             COMMAND:
  1889.                  CRES
  1890.  
  1891.             PURPOSE:
  1892.                  Sets  the  color  bit  resolution  for  256  color  VGA
  1893.                  graphics.
  1894.  
  1895.             SYNTAX:
  1896.                  CRES [value]
  1897.  
  1898.             DESCRIPTION:
  1899.                  When CImage needs to display a 24-bit image onto a  256
  1900.                  color display,  CImage needs  to reduce  the number  of
  1901.                  colors that the image uses.  This is by sorting  colors
  1902.                  by popularity, choosing the  most popular, and  mapping
  1903.                  the rest of the colors  to it's closest counterpart  in
  1904.                  the list of the top 256.
  1905.  
  1906.                  When CImage needs to display an image, it needs to know
  1907.                  how many shades of red, green, and blue the video  card
  1908.                  allows.  Most cards allow for 6 bits of resolution  (0-
  1909.                  63, or 64)  for each element.   To  calculate how  many
  1910.                  displayable colors,  multiply red  * green  * blue,  or
  1911.                  64*64*64 =  262,144.   This  is  the number  of  colors
  1912.                  possible,  however   only   256  colors   are   allowed
  1913.                  simultaneously.  CRES tells CImage how many shades  the
  1914.                  video card allows for each  element so that CImage  can
  1915.                  reduce the number of  shades as well  as the number  of
  1916.                  colors.
  1917.  
  1918.             NOTES:
  1919.                  If [value] is  not given,  then CRES  will display  the
  1920.                  current value.
  1921.  
  1922.                  CImage does  not  support  modes  with  less  than  256
  1923.                  colors.
  1924.  
  1925.                  When CImage loads  or creates  an image  buffer, it  is
  1926.                  stored internally as  a 24-bit image.   Even if  CImage
  1927.                  loads a 256-color  GIF file, it  is still converted  to
  1928.                  24-bits as it is loaded.  This is because modifications
  1929.                  to an image  buffer may increase  the number of  colors
  1930.                  that it uses.  This also  allows for CImage to  perform
  1931.                  functions on  image buffers  with the  least amount  of
  1932.                  accuracy loss.
  1933.  
  1934.             SHORTCUT:
  1935.                  None.
  1936.  
  1937.             SEE ALSO:
  1938.                  VESAINFO BIOSINFO VMODE VCOLORS CRES SHOW
  1939.  
  1940.  
  1941.  
  1942.  
  1943.                                        Page 31
  1944.  
  1945.  
  1946.  
  1947.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  1948.  
  1949.  
  1950.  
  1951.             COMMAND:
  1952.                  DARKEN
  1953.  
  1954.             PURPOSE:
  1955.                  Darkens an image buffer.
  1956.  
  1957.             SYNTAX:
  1958.                  DARKEN <amount> <inbuf> [outbuf]
  1959.  
  1960.             DESCRIPTION:
  1961.                  DARKEN will  decrease  the  brightness  of  <inbuf>  by
  1962.                  <amount>.  <amount> is a component value, so the  range
  1963.                  is 1-255.
  1964.  
  1965.             NOTES:
  1966.                  If [outbuf]  is not  given, then  <inbuf> contains  the
  1967.                  result.
  1968.  
  1969.             SHORTCUT:
  1970.                  DARK
  1971.  
  1972.             SEE ALSO:
  1973.                  BRIGHTEN
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.  
  1988.  
  1989.  
  1990.  
  1991.  
  1992.  
  1993.  
  1994.  
  1995.  
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002.  
  2003.  
  2004.  
  2005.  
  2006.                                        Page 32
  2007.  
  2008.  
  2009.  
  2010.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  2011.  
  2012.  
  2013.  
  2014.             COMMAND:
  2015.                  DIVIDE
  2016.  
  2017.             PURPOSE:
  2018.                  Divide the contents of two image buffers.
  2019.  
  2020.             SYNTAX:
  2021.                  DIVIDE <buf1> <buf2> [outbuf]
  2022.  
  2023.             DESCRIPTION:
  2024.                  DIVIDE will divide,  pixel by  pixel each  of the  red,
  2025.                  blue and  green components  of  <buf1> and  <buf2>  and
  2026.                  place the result into [outbuf].
  2027.  
  2028.             NOTES:
  2029.                  If [outbuf]  is not  given,  then <buf1>  contains  the
  2030.                  result.
  2031.  
  2032.                  Upon dividing the components, if a component if  <buf2>
  2033.                  is zero, then the result is automatically zero, since a
  2034.                  divide by zero is impossible.
  2035.  
  2036.             SHORTCUT:
  2037.                  DIV
  2038.  
  2039.             SEE ALSO:
  2040.                  ADD SUBTRACT MULTIPLY DIVIDE
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.  
  2054.  
  2055.  
  2056.  
  2057.  
  2058.  
  2059.  
  2060.  
  2061.  
  2062.  
  2063.  
  2064.  
  2065.  
  2066.  
  2067.  
  2068.  
  2069.                                        Page 33
  2070.  
  2071.  
  2072.  
  2073.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  2074.  
  2075.  
  2076.  
  2077.             COMMAND:
  2078.                  ECHO
  2079.  
  2080.             PURPOSE:
  2081.                  ECHO is used to display text during the execution of an
  2082.                  CImage batch file.
  2083.  
  2084.             SYNTAX:
  2085.                  ECHO ON
  2086.                -or-
  2087.                  ECHO OFF
  2088.                -or-
  2089.                  ECHO <string>
  2090.  
  2091.             DESCRIPTION:
  2092.                  Normally as a batch file  is running, the commands  are
  2093.                  "echoed" to the screen as they are executed.  This  can
  2094.                  be turned off  by adding the  command ECHO  OFF to  the
  2095.                  batch file.  Once it has  been turned off, the ECHO  ON
  2096.                  can turn it back on.   The ECHO setting is reset to  ON
  2097.                  when all batch files have completed processing.
  2098.  
  2099.                  If ECHO is  followed by  <string>, then  the string  is
  2100.                  ECHOed to the screen.
  2101.  
  2102.             NOTES:
  2103.                  An "@" character placed in front of a command line in a
  2104.                  batch file prevents that line from echoing.
  2105.  
  2106.                  An ECHO. will echo a blank line to the screen.
  2107.  
  2108.                  Currently, ECHO will echo all text as upper-case only.
  2109.  
  2110.             SHORTCUT:
  2111.                  None.
  2112.  
  2113.             SEE ALSO:
  2114.                  BATCH ASK IF GOTO : REM PAUSE
  2115.  
  2116.  
  2117.  
  2118.  
  2119.  
  2120.  
  2121.  
  2122.  
  2123.  
  2124.  
  2125.  
  2126.  
  2127.  
  2128.  
  2129.  
  2130.  
  2131.  
  2132.                                        Page 34
  2133.  
  2134.  
  2135.  
  2136.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  2137.  
  2138.  
  2139.  
  2140.             COMMAND:
  2141.                  EXIT
  2142.  
  2143.             PURPOSE:
  2144.                  EXIT will exit from the CImage command processor  shell
  2145.                  to the previous level if one exists, otherwise, you are
  2146.                  exited to the DOS command prompt.
  2147.  
  2148.             SYNTAX:
  2149.                  Exit
  2150.  
  2151.             DESCRIPTION:
  2152.                  Once running CImage,  you can run  different levels  of
  2153.                  the CImage command pro cessor.  This is  done by simply
  2154.                  running CImage from  within itself.   Once running  the
  2155.                  second level, you  can exit  to the  previous level  by
  2156.                  typing EXIT.
  2157.  
  2158.             NOTES:
  2159.                  None.
  2160.  
  2161.             SHORTCUT:
  2162.                  Q -or- QUIT
  2163.  
  2164.             SEE ALSO:
  2165.                  None.
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.  
  2186.  
  2187.  
  2188.  
  2189.  
  2190.  
  2191.  
  2192.  
  2193.  
  2194.  
  2195.                                        Page 35
  2196.  
  2197.  
  2198.  
  2199.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  2200.  
  2201.  
  2202.  
  2203.             COMMAND:
  2204.                  FADE
  2205.  
  2206.             PURPOSE:
  2207.                  Creates a test image that fades from light to dark.
  2208.  
  2209.             SYNTAX:
  2210.                  FADE <xres> <yres> <red> <green> <blue> [outbuf] [dir]
  2211.  
  2212.             DESCRIPTION:
  2213.                  FADE will  create a  256-color  image that  fades  from
  2214.                  light to dark the elements of <red>, <green> and <blue>
  2215.                  in the direction of [dir],  and place it into  [outbuf]
  2216.                  at a resolution of <xres> by <yres>.
  2217.  
  2218.                  Each of the <red>, <green> and <blue> component  values
  2219.                  are entered as a '0' or a non-zero value.  Any '1' must
  2220.                  be placed in this value to cause FADE to add that color
  2221.                  to the fade.   A fade of 1  0 0 will  create a fade  of
  2222.                  only shades of red.
  2223.  
  2224.                  Use [dir] to denote which direction to create the  fade
  2225.                  image.  Valid  values are  U, D,  L, R,  for Up,  Down,
  2226.                  Left, Right  respectively.   [dir] points  to the  dark
  2227.                  side of the image  (Up would start at  the top as  dark
  2228.                  and work down to light).
  2229.  
  2230.             NOTES:
  2231.                  If [outbuf] is  not given,  then FADE  will create  the
  2232.                  first available buffer.
  2233.  
  2234.                  If [dir] is not given, then  FADE will use 'D'  (down).
  2235.                  FADE was originally a test image for the developer, but
  2236.                  was left in for  users.  One use  might be to create  a
  2237.                  fade, and subtract that from another image for a simple
  2238.                  effect.
  2239.  
  2240.                  The "Loaded as file name" is set to FADE.TGA
  2241.  
  2242.             SHORTCUT:
  2243.                  None.
  2244.  
  2245.             SEE ALSO:
  2246.                  None.
  2247.  
  2248.  
  2249.  
  2250.  
  2251.  
  2252.  
  2253.  
  2254.  
  2255.  
  2256.  
  2257.  
  2258.                                        Page 36
  2259.  
  2260.  
  2261.  
  2262.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  2263.  
  2264.  
  2265.  
  2266.             COMMAND:
  2267.                  FILL
  2268.  
  2269.             PURPOSE:
  2270.                  Fills a buffer of a given color.
  2271.  
  2272.             SYNTAX:
  2273.                  FILL <xres> <yres> <red> <green> <blue> [outbuf]
  2274.  
  2275.             DESCRIPTION:
  2276.                  FILL will  create  an  image of  resolution  <xres>  by
  2277.                  <yres>  filled  with  the  color  specified  by  <red>,
  2278.                  <green> and <blue> and place it into [outbuf].
  2279.  
  2280.             NOTES:
  2281.                  If [outbuf] is  not given,  then FILL  will create  the
  2282.                  first available buffer.
  2283.  
  2284.                  The "Loaded as file name" is set to FILLED.TGA
  2285.  
  2286.             SHORTCUT:
  2287.                  None.
  2288.  
  2289.             SEE ALSO:
  2290.                  None.
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316.  
  2317.  
  2318.  
  2319.  
  2320.  
  2321.                                        Page 37
  2322.  
  2323.  
  2324.  
  2325.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  2326.  
  2327.  
  2328.  
  2329.             COMMAND:
  2330.                  FILTERFILE
  2331.  
  2332.             PURPOSE:
  2333.                  Sets the filename used for the convolution filters.
  2334.  
  2335.             SYNTAX:
  2336.                  FILTERFILE [filename]
  2337.  
  2338.             DESCRIPTION:
  2339.                  FILTERFILE sets the filename that  is used by the  CONV
  2340.                  and LC  commands  for  locating  and  performing  user-
  2341.                  defined convolution filters.  See the CONV command  for
  2342.                  more information on performing convolution filters.
  2343.  
  2344.                  The default name  is FILTERS.FLT, and  must be  located
  2345.                  in, first, the current directory.   If the filter  file
  2346.                  is not found  there, then  CImage will  search for  the
  2347.                  file in the directory from which it was originally run.
  2348.  
  2349.             NOTES:
  2350.                  If [filename] is  not given, then  the FILTERFILE  will
  2351.                  display the current filename.
  2352.  
  2353.             SHORTCUT:
  2354.                  FFILE
  2355.  
  2356.             SEE ALSO:
  2357.                  CONV LC
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381.  
  2382.  
  2383.  
  2384.                                        Page 38
  2385.  
  2386.  
  2387.  
  2388.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  2389.  
  2390.  
  2391.  
  2392.             COMMAND:
  2393.                  FLIP
  2394.  
  2395.             PURPOSE:
  2396.                  Flip an image buffer top to bottom or left to right.
  2397.  
  2398.             SYNTAX:
  2399.                  FLIP <dir> <inbuf> [outbuf]
  2400.  
  2401.             DESCRIPTION:
  2402.                  FLIP will  flip the  buffer  <inbuf> in  the  direction
  2403.                  specified by <dir> and place the result into [outbuf].
  2404.  
  2405.                  Valid values for  <dir> are U,  D, L, R  for Up,  Down,
  2406.                  Left, Right, respectively.
  2407.  
  2408.             NOTES:
  2409.                  If [outbuf] is  not given,  then the  result is  placed
  2410.                  into <inbuf>.
  2411.  
  2412.                  There is no difference between Up  and Down.  There  is
  2413.                  also no difference between Left and Right.
  2414.  
  2415.             SHORTCUT:
  2416.                  None.
  2417.  
  2418.             SEE ALSO:
  2419.                  None.
  2420.  
  2421.  
  2422.  
  2423.  
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.                                        Page 39
  2448.  
  2449.  
  2450.  
  2451.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  2452.  
  2453.  
  2454.  
  2455.             COMMAND:
  2456.                  FREE
  2457.  
  2458.             PURPOSE:
  2459.                  Release a buffer, freeing up the memory that it uses.
  2460.  
  2461.             SYNTAX:
  2462.                  FREE <buf>
  2463.                -or-
  2464.                  FREE ALL
  2465.  
  2466.             DESCRIPTION:
  2467.                  FREE will free the memory used  by <buf>.  If <buf>  is
  2468.                  "ALL", then all buffers will be freed.
  2469.  
  2470.             NOTES:
  2471.                  FREE will not ask to verify, even if you use "FREE ALL"
  2472.  
  2473.             SHORTCUT:
  2474.                  None.
  2475.  
  2476.             SEE ALSO:
  2477.                  None.
  2478.  
  2479.  
  2480.  
  2481.  
  2482.  
  2483.  
  2484.  
  2485.  
  2486.  
  2487.  
  2488.  
  2489.  
  2490.  
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509.  
  2510.                                        Page 40
  2511.  
  2512.  
  2513.  
  2514.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  2515.  
  2516.  
  2517.  
  2518.             COMMAND:
  2519.                  GAMMA
  2520.  
  2521.             PURPOSE:
  2522.                  Perform gamma correction.
  2523.  
  2524.             SYNTAX:
  2525.                  GAMMA <inbuf> [outbuf]
  2526.  
  2527.             DESCRIPTION:
  2528.                  GAMMA will correct the gamma  of <inbuf> and place  the
  2529.                  result into [outbuf].
  2530.  
  2531.                  It is usually safe to assume that black is 0 and  white
  2532.                  is 255.  How ever, it is not necessarily  true that 128
  2533.                  appears exactly as a medium grey (which would mean that
  2534.                  color intensity output is linear).  On most  computers,
  2535.                  color intensity  output  is  not linear,  and  must  be
  2536.                  adjusted accordingly.  The  GAMMA command will  correct
  2537.                  this on images  and make it  appear that  the image  is
  2538.                  being displayed with linear color intensity output.
  2539.  
  2540.                  The GAMMA  function  uses the  value  set by  the  GAMV
  2541.                  command to set the amount of gamma correction.
  2542.  
  2543.             NOTES:
  2544.                  If [outbuf] is  not given,  then the  result is  placed
  2545.                  into <inbuf>
  2546.  
  2547.             SHORTCUT:
  2548.                  GAMM
  2549.  
  2550.             SEE ALSO:
  2551.                  GAMV
  2552.  
  2553.  
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.  
  2573.                                        Page 41
  2574.  
  2575.  
  2576.  
  2577.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  2578.  
  2579.  
  2580.  
  2581.             COMMAND:
  2582.                  GAMV
  2583.  
  2584.             PURPOSE:
  2585.                  Set the gamma correction level.
  2586.  
  2587.             SYNTAX:
  2588.                  GAMV [value]
  2589.  
  2590.             DESCRIPTION:
  2591.                  GAMV will set the gamma correction level for the  GAMMA
  2592.                  command.   See  the  GAMMA command  for  more  detailed
  2593.                  information on gamma correction.
  2594.  
  2595.             NOTES:
  2596.                  If [value] is not given, then the current value will be
  2597.                  displayed.
  2598.  
  2599.                  The default value for GAMV is 0.6.
  2600.  
  2601.             SHORTCUT:
  2602.                  None.
  2603.  
  2604.             SEE ALSO:
  2605.                  GAMMA
  2606.  
  2607.  
  2608.  
  2609.  
  2610.  
  2611.  
  2612.  
  2613.  
  2614.  
  2615.  
  2616.  
  2617.  
  2618.  
  2619.  
  2620.  
  2621.  
  2622.  
  2623.  
  2624.  
  2625.  
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.                                        Page 42
  2637.  
  2638.  
  2639.  
  2640.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  2641.  
  2642.  
  2643.  
  2644.             COMMAND:
  2645.                  GOTO
  2646.  
  2647.             PURPOSE:
  2648.                  Alter the program flow within an CImage batch file.
  2649.  
  2650.             SYNTAX:
  2651.                  GOTO <label>
  2652.  
  2653.             DESCRIPTION:
  2654.                  The GOTO  command will  cause the  batch file  to  stop
  2655.                  processing, locate <label> within  the batch file,  and
  2656.                  continue processing there.  Labels are designated by  a
  2657.                  ':'.   See the  ':' for  more detailed  information  on
  2658.                  labels.
  2659.  
  2660.             NOTES:
  2661.                  The GOTO command is meant to be used within batch files
  2662.                  only.
  2663.  
  2664.             SHORTCUT:
  2665.                  None.
  2666.  
  2667.             SEE ALSO:
  2668.                  BATCH ASK IF : REM PAUSE ECHO
  2669.  
  2670.  
  2671.  
  2672.  
  2673.  
  2674.  
  2675.  
  2676.  
  2677.  
  2678.  
  2679.  
  2680.  
  2681.  
  2682.  
  2683.  
  2684.  
  2685.  
  2686.  
  2687.  
  2688.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.                                        Page 43
  2700.  
  2701.  
  2702.  
  2703.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  2704.  
  2705.  
  2706.  
  2707.             COMMAND:
  2708.                  GREYSCALE
  2709.  
  2710.             PURPOSE:
  2711.                  Convert the current image into a greyscale image.
  2712.  
  2713.             SYNTAX:
  2714.                  GREYSCALE <inbuf> [outbuf]
  2715.  
  2716.             DESCRIPTION:
  2717.                  GREYSCALE will convert <inbuf>  to greyscale and  place
  2718.                  the results into [outbuf].
  2719.  
  2720.                  Converting an image to grayscale is very simple.   Each
  2721.                  pixel's red,  green and  blue components  are  compared
  2722.                  against each  other  to find  the  largest  (brightest)
  2723.                  value, then all three components are set to this value.
  2724.  
  2725.             NOTES:
  2726.                  If [outbuf] is  not given,  then the  result is  placed
  2727.                  into <inbuf>
  2728.  
  2729.                  There is no command to convert from greyscale to color,
  2730.                  since  a  greyscale  image  does  not  contain  enough
  2731.                  information to perform such a task.
  2732.  
  2733.             SHORTCUT:
  2734.                  GREY
  2735.  
  2736.             SEE ALSO:
  2737.                  None.
  2738.  
  2739.  
  2740.  
  2741.  
  2742.  
  2743.  
  2744.  
  2745.  
  2746.  
  2747.  
  2748.  
  2749.  
  2750.  
  2751.  
  2752.  
  2753.  
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.  
  2761.  
  2762.                                        Page 44
  2763.  
  2764.  
  2765.  
  2766.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  2767.  
  2768.  
  2769.  
  2770.             COMMAND:
  2771.                  IF
  2772.  
  2773.             PURPOSE:
  2774.                  The IF and IFNOT  commands allow conditional  execution
  2775.                  of  commands  based  on   the  results  of  a   logical
  2776.                  condition.   When the  condition is  true, then  CImage
  2777.                  executes the <command>;  otherwise, CImage will  ignore
  2778.                  the command.
  2779.  
  2780.             SYNTAX:
  2781.                  IF ERRORLEVEL <number> <command>
  2782.                -or-
  2783.                  IFNOT ERRORLEVEL <number> <command>
  2784.                -or-
  2785.                  IF <string1> == <string2> <command>
  2786.                -or-
  2787.                  IFNOT <string1> == <string2> <command>
  2788.                -or-
  2789.                  IF EXIST <filename> <command>
  2790.                -or-
  2791.                  IFNOT EXIST <filename> <command>
  2792.  
  2793.             DESCRIPTION:
  2794.                  The conditions are described as follows:
  2795.                  ERRORLEVEL      True if,  and  only  if,  the  previous
  2796.                                  command executed had an exit code equal
  2797.                                  to <number>.
  2798.                  <string1> == <string2>  True if, and only if, <string1>
  2799.                                  is equal  to  <string2>.   The  strings
  2800.                                  must not contain spaces.
  2801.                  EXIST           True if,  and only  if, the  <filename>
  2802.                                  exists in the current directory.
  2803.  
  2804.             NOTES:
  2805.                  Currently, the only CImage command that returns an exit
  2806.                  code is the ASK  command.  DOS  command exit codes  are
  2807.                  currently not supported.
  2808.  
  2809.             SHORTCUT:
  2810.                  None.
  2811.  
  2812.             SEE ALSO:
  2813.                  BATCH ASK GOTO : REM PAUSE ECHO
  2814.  
  2815.  
  2816.  
  2817.  
  2818.  
  2819.  
  2820.  
  2821.  
  2822.  
  2823.  
  2824.  
  2825.                                        Page 45
  2826.  
  2827.  
  2828.  
  2829.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  2830.  
  2831.  
  2832.             COMMAND:
  2833.                  LB
  2834.  
  2835.             PURPOSE:
  2836.                  List the currently allocated image buffers.
  2837.  
  2838.             SYNTAX:
  2839.                  LB
  2840.  
  2841.             DESCRIPTION:
  2842.                  LB  will  list  the   current  information  about   all
  2843.                  currently allocated buffers:
  2844.                     Buffer number
  2845.                     Loaded file name
  2846.                     Loaded file type
  2847.                     Last saved name
  2848.                     Last saved file type
  2849.                     Resolution
  2850.  
  2851.             NOTES:
  2852.                  None.
  2853.  
  2854.             SHORTCUT:
  2855.                  None.
  2856.  
  2857.             SEE ALSO:
  2858.                  LOAD SAVE MERGE
  2859.  
  2860.  
  2861.  
  2862.  
  2863.  
  2864.  
  2865.  
  2866.  
  2867.  
  2868.  
  2869.  
  2870.  
  2871.  
  2872.  
  2873.  
  2874.  
  2875.  
  2876.  
  2877.  
  2878.  
  2879.  
  2880.  
  2881.  
  2882.  
  2883.  
  2884.  
  2885.  
  2886.  
  2887.  
  2888.                                        Page 46
  2889.  
  2890.  
  2891.  
  2892.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  2893.  
  2894.  
  2895.  
  2896.             COMMAND:
  2897.                  LC
  2898.  
  2899.             PURPOSE:
  2900.                  List all convolution  filters contained  in the  filter
  2901.                  file  (defined  by  the  FILTERFILE  command;   default
  2902.                  filename is FILTERS.FLT).
  2903.  
  2904.             SYNTAX:
  2905.                  LC
  2906.  
  2907.             DESCRIPTION:
  2908.                  LC Will list all the convolution filters in the  filter
  2909.                  file sorted by grid size (3, 5 or 7).
  2910.  
  2911.             NOTES:
  2912.                  CImage will search for the filter file in the following
  2913.                  order:
  2914.                   1.  The current directory
  2915.                   2.  The default CImage directory (where CIMAGE.EXE is
  2916.                       stored)
  2917.  
  2918.             SHORTCUT:
  2919.                  None.
  2920.  
  2921.             SEE ALSO:
  2922.                  CONV FILTERFILE
  2923.  
  2924.  
  2925.  
  2926.  
  2927.  
  2928.  
  2929.  
  2930.  
  2931.  
  2932.  
  2933.  
  2934.  
  2935.  
  2936.  
  2937.  
  2938.  
  2939.  
  2940.  
  2941.  
  2942.  
  2943.  
  2944.  
  2945.  
  2946.  
  2947.  
  2948.  
  2949.  
  2950.  
  2951.                                        Page 47
  2952.  
  2953.  
  2954.  
  2955.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  2956.  
  2957.  
  2958.  
  2959.             COMMAND:
  2960.                  LOAD
  2961.  
  2962.             PURPOSE:
  2963.                  LOAD will load images into memory.
  2964.  
  2965.             SYNTAX:
  2966.                  LOAD <filename> [buffer]
  2967.  
  2968.             DESCRIPTION:
  2969.                  LOAD will load <filename> into [buffer].
  2970.  
  2971.             NOTES:
  2972.                  If [buffer] is  not given,  then LOAD  will create  the
  2973.                  first available buffer.
  2974.  
  2975.                  Currently, LOAD does not interrogate the file  contents
  2976.                  to decide what type of image file to load.  The  file's
  2977.                  extension is used to decide the file's type.  Once  the
  2978.                  file type  is obtained  from the  extension, LOAD  will
  2979.                  verify the file is indeed the proper file type.
  2980.  
  2981.                  Current supported file types are:
  2982.                     IMG - VIVID/BOB format
  2983.                     GIF - GIF87a (and GIF89a files that are compatible)
  2984.                     TGA - Only type 2, uncompressed
  2985.                     BMP - All versions (Windows, and OS/2)
  2986.                     IPI - CImage's internal format (See HELP IPI for
  2987.                           details on format)
  2988.  
  2989.             SHORTCUT:
  2990.                  None.
  2991.  
  2992.             SEE ALSO:
  2993.                  SAVE MERGE LB
  2994.  
  2995.  
  2996.  
  2997.  
  2998.  
  2999.  
  3000.  
  3001.  
  3002.  
  3003.  
  3004.  
  3005.  
  3006.  
  3007.  
  3008.  
  3009.  
  3010.  
  3011.  
  3012.  
  3013.  
  3014.                                        Page 48
  3015.  
  3016.  
  3017.  
  3018.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  3019.  
  3020.  
  3021.  
  3022.             COMMAND:
  3023.                  MACRO
  3024.  
  3025.             PURPOSE:
  3026.                  Creates a macro.
  3027.  
  3028.             SYNTAX:
  3029.                  MACRO [macro] [cmd-line]
  3030.  
  3031.             DESCRIPTION:
  3032.                  MACRO will define [macro] to be [command-line]
  3033.                  Macros are  shortcuts.    You  can  define  almost  any
  3034.                  command-line to a macro.
  3035.  
  3036.                  Say you define "P" to be  "PLASMA 640 480 3.3".   Then,
  3037.                  every time you type a "P" (followed by [RETURN]) on the
  3038.                  command line, CImage will interpret it as: "PLASMA  640
  3039.                  480 3.3" (which will create a plasma image the size  of
  3040.                  640x480 with the grain factor of 3.3, and place it into
  3041.                  the first available buffer).
  3042.  
  3043.                  Macros  can  also  be  inserted  into  a   command-line
  3044.                  anywhere.  For example, you  could use "plasma 640  480
  3045.                  PVAL" where PVAL has been defined as "3.3".  Macros may
  3046.                  also reference  themselves.    "P" may  be  defined  as
  3047.                  "PLASMA 640 480 PVAL" and if  PVAL has been defined  as
  3048.                  "3.3", then that line "P" is interpreted as "PLASMA 640
  3049.                  480 3.3".
  3050.  
  3051.             NOTES:
  3052.                  Macros  may   reference  environment   variables,   but
  3053.                  environment variables may not reference macros.
  3054.                  If [cmd-line] is  not given, then  the [macro] will  be
  3055.                  removed from the macro list.
  3056.  
  3057.                  If [macro]  and [cmd-line]  are not  given, then  MACRO
  3058.                  will list all currently defined macros.
  3059.  
  3060.                  [cmd-line] may contain spaces.
  3061.  
  3062.                  Since a semicolon on the CImage command line is used to
  3063.                  separate multiple commands, you need to use the  carrot
  3064.                  (^) character where semicolons are to be placed.  These
  3065.                  semicolons will not,  however, become separate  command
  3066.                  lines within a single  macro, they will be  interpreted
  3067.                  as one command line.
  3068.  
  3069.                  Macros must  be  separated  from  other  words  on  the
  3070.                  command line they are to be used in by a space.
  3071.  
  3072.             SHORTCUT:
  3073.                  None.
  3074.  
  3075.  
  3076.  
  3077.                                        Page 49
  3078.  
  3079.  
  3080.  
  3081.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  3082.  
  3083.  
  3084.             SEE ALSO:
  3085.                  SET
  3086.  
  3087.  
  3088.  
  3089.  
  3090.  
  3091.  
  3092.  
  3093.  
  3094.  
  3095.  
  3096.  
  3097.  
  3098.  
  3099.  
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.  
  3108.  
  3109.  
  3110.  
  3111.  
  3112.  
  3113.  
  3114.  
  3115.  
  3116.  
  3117.  
  3118.  
  3119.  
  3120.  
  3121.  
  3122.  
  3123.  
  3124.  
  3125.  
  3126.  
  3127.  
  3128.  
  3129.  
  3130.  
  3131.  
  3132.  
  3133.  
  3134.  
  3135.  
  3136.  
  3137.  
  3138.  
  3139.  
  3140.                                        Page 50
  3141.  
  3142.  
  3143.  
  3144.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  3145.  
  3146.  
  3147.  
  3148.             COMMAND:
  3149.                  MEM
  3150.  
  3151.             PURPOSE:
  3152.                  Display the current status of memory.
  3153.  
  3154.             SYNTAX:
  3155.                  MEM
  3156.  
  3157.             DESCRIPTION:
  3158.                  MEM will display the following information:
  3159.                     1. Largest available block of memory
  3160.                     2. Size of paging/file partition
  3161.  
  3162.                  The "Largest available block of memory" is quite  self-
  3163.                  explanatory. This  includes all  virtual memory.    The
  3164.                  "Size of  paging/file partition"  is  the size  of  the
  3165.                  virtual memory portion of available memory.
  3166.  
  3167.             NOTES:
  3168.                  None.
  3169.  
  3170.             SHORTCUT:
  3171.                  None.
  3172.  
  3173.             SEE ALSO:
  3174.                  MEMORY
  3175.  
  3176.  
  3177.  
  3178.  
  3179.  
  3180.  
  3181.  
  3182.  
  3183.  
  3184.  
  3185.  
  3186.  
  3187.  
  3188.  
  3189.  
  3190.  
  3191.  
  3192.  
  3193.  
  3194.  
  3195.  
  3196.  
  3197.  
  3198.  
  3199.  
  3200.  
  3201.  
  3202.  
  3203.                                        Page 51
  3204.  
  3205.  
  3206.  
  3207.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  3208.  
  3209.  
  3210.  
  3211.             COMMAND:
  3212.                  MERGE
  3213.  
  3214.             PURPOSE:
  3215.                  Merges three color separated images into one full color
  3216.                  image.
  3217.  
  3218.             SYNTAX:
  3219.                  MERGE <redfile> <bluefile> <greenfile> [outbuf]
  3220.  
  3221.             DESCRIPTION:
  3222.                  MERGE performs three  LOADs; one LOAD  for each of  the
  3223.                  different   files   in   <redfile>,   <bluefile>    and
  3224.                  <greenfile> with the exception that MERGE gets the  red
  3225.                  element of the image  from <redfile>, the blue  element
  3226.                  from <bluefile> and the green element from <greenfile>.
  3227.                  These are then  merged into a  single image and  placed
  3228.                  into [outbuf].
  3229.  
  3230.                  This is  useful for  people  who have  monochrome  hand
  3231.                  scanners.  It is possible to actually digitize a  color
  3232.                  image with a  monochrome hand scanner.   Scan an  image
  3233.                  three times using a red filter the first time, a  green
  3234.                  filter the  second time,  and a  blue filter  the  last
  3235.                  time.  Use  your hand scanner's  software to align  the
  3236.                  three images,  and import  them into  CImage using  the
  3237.                  MERGE command.  What you will get is a full-color image
  3238.                  in [outbuf].
  3239.  
  3240.             NOTES:
  3241.                  If [outbuf] is  not given, then  MERGE will create  the
  3242.                  first available buffer.
  3243.  
  3244.                  The three files in MERGE  may be different file  types,
  3245.                  however, they must all have the same resolution.
  3246.  
  3247.             SHORTCUT:
  3248.                  None.
  3249.  
  3250.             SEE ALSO:
  3251.                  LOAD SAVE LB OVERLAY
  3252.  
  3253.  
  3254.  
  3255.  
  3256.  
  3257.  
  3258.  
  3259.  
  3260.  
  3261.  
  3262.  
  3263.  
  3264.  
  3265.  
  3266.                                        Page 52
  3267.  
  3268.  
  3269.  
  3270.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  3271.  
  3272.  
  3273.  
  3274.             COMMAND:
  3275.                  MULTIPLY
  3276.  
  3277.             PURPOSE:
  3278.                  Multiply the contents of two image buffers.
  3279.  
  3280.             SYNTAX:
  3281.                  MULTIPLY <buf1> <buf2> [outbuf]
  3282.  
  3283.             DESCRIPTION:
  3284.                  MULTIPLY will multiply, pixel by pixel each of the red,
  3285.                  blue and  green components  of  <buf1> and  <buf2>  and
  3286.                  place the result into [outbuf].
  3287.  
  3288.             NOTES:
  3289.                  If [outbuf]  is not  given,  then <buf1>  contains  the
  3290.                  result.
  3291.  
  3292.                  Upon multiplying the components, if the two  components
  3293.                  multiplied are  greater than  255, then  the  component
  3294.                  value is clipped to 255.
  3295.  
  3296.             SHORTCUT:
  3297.                  MULT
  3298.  
  3299.             SEE ALSO:
  3300.                  ADD SUBTRACT DIVIDE
  3301.  
  3302.  
  3303.  
  3304.  
  3305.  
  3306.  
  3307.  
  3308.  
  3309.  
  3310.  
  3311.  
  3312.  
  3313.  
  3314.  
  3315.  
  3316.  
  3317.  
  3318.  
  3319.  
  3320.  
  3321.  
  3322.  
  3323.  
  3324.  
  3325.  
  3326.  
  3327.  
  3328.  
  3329.                                        Page 53
  3330.  
  3331.  
  3332.  
  3333.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  3334.  
  3335.  
  3336.  
  3337.             COMMAND:
  3338.                  NEGATE
  3339.  
  3340.             PURPOSE:
  3341.                  Create a photo negative of an image.
  3342.  
  3343.             SYNTAX:
  3344.                  NEGATE <inbuf> [outbuf]
  3345.  
  3346.             DESCRIPTION:
  3347.                  Negate reads the value of  each color element for  each
  3348.                  pixel,  and  subtracts  it  from  255.    Placing   the
  3349.                  resulting image into [outbuf].
  3350.  
  3351.                  The  effect  is  an   intensity  reversal  (or   "photo
  3352.                  negative"), in  which black  becomes white,  and  white
  3353.                  becomes black.
  3354.  
  3355.             NOTES:
  3356.                  If [outbuf]  is not  given, then  <inbuf> contains  the
  3357.                  result.
  3358.  
  3359.             SHORTCUT:
  3360.                  NEG
  3361.  
  3362.             SEE ALSO:
  3363.                  None.
  3364.  
  3365.  
  3366.  
  3367.  
  3368.  
  3369.  
  3370.  
  3371.  
  3372.  
  3373.  
  3374.  
  3375.  
  3376.  
  3377.  
  3378.  
  3379.  
  3380.  
  3381.  
  3382.  
  3383.  
  3384.  
  3385.  
  3386.  
  3387.  
  3388.  
  3389.  
  3390.  
  3391.  
  3392.                                        Page 54
  3393.  
  3394.  
  3395.  
  3396.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  3397.  
  3398.  
  3399.  
  3400.             COMMAND:
  3401.                  NOISE
  3402.  
  3403.             PURPOSE:
  3404.                  Add random noise to an image.
  3405.  
  3406.             SYNTAX:
  3407.                  NOISE <amount> <inbuf> [outbuf]
  3408.  
  3409.             DESCRIPTION:
  3410.                  Computer generated images often  look to "perfect"  and
  3411.                  therefore, unrealistic.  NOISE can be used to help this
  3412.                  matter.
  3413.  
  3414.                  NOISE will randomly add  n <amount> to each  individual
  3415.                  pixel in <inbuf>, and place the result into [outbuf].
  3416.  
  3417.                  A useful value for <amount> would be 5-15.
  3418.  
  3419.             NOTES:
  3420.                  Valid range for <amount> is 1-255.
  3421.  
  3422.                  If [outbuf]  is not  given, then  <inbuf> contains  the
  3423.                  result.
  3424.  
  3425.                  If the addition  or subtraction of  <amount> takes  the
  3426.                  result above 255 or below 0, then the value is  clipped
  3427.                  to 0 or 255, respectively.
  3428.  
  3429.             SHORTCUT:
  3430.                  NOIS
  3431.  
  3432.             SEE ALSO:
  3433.                  None.
  3434.  
  3435.  
  3436.  
  3437.  
  3438.  
  3439.  
  3440.  
  3441.  
  3442.  
  3443.  
  3444.  
  3445.  
  3446.  
  3447.  
  3448.  
  3449.  
  3450.  
  3451.  
  3452.  
  3453.  
  3454.  
  3455.                                        Page 55
  3456.  
  3457.  
  3458.  
  3459.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  3460.  
  3461.  
  3462.  
  3463.             COMMAND:
  3464.                  NORMALIZE
  3465.  
  3466.             PURPOSE:
  3467.                  Perform a histogram normalization on an image.
  3468.  
  3469.             SYNTAX:
  3470.                  NORMALIZE <inbuf> [outbuf]
  3471.  
  3472.             DESCRIPTION:
  3473.                  NORMALIZE  performs  a   histogram  normalization   (or
  3474.                  contrast enhancement) on <inbuf>.
  3475.  
  3476.                  A histogram normalization  is quite a  simple task.   A
  3477.                  normalization finds the darkest  color, and maps it  to
  3478.                  zero, then it finds the brightest color and maps it  to
  3479.                  white.  This is useful  for adding contrast to  images,
  3480.                  like very hazy images.  Normalization can actually turn
  3481.                  a "foggy" picture into a "sunny day" picture.
  3482.  
  3483.             NOTES:
  3484.                  If [outbuf]  is not  given, then  <inbuf> contains  the
  3485.                  result.
  3486.  
  3487.             SHORTCUT:
  3488.                  NORM
  3489.  
  3490.             SEE ALSO:
  3491.                  None.
  3492.  
  3493.  
  3494.  
  3495.  
  3496.  
  3497.  
  3498.  
  3499.  
  3500.  
  3501.  
  3502.  
  3503.  
  3504.  
  3505.  
  3506.  
  3507.  
  3508.  
  3509.  
  3510.  
  3511.  
  3512.  
  3513.  
  3514.  
  3515.  
  3516.  
  3517.  
  3518.                                        Page 56
  3519.  
  3520.  
  3521.  
  3522.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  3523.  
  3524.  
  3525.  
  3526.             COMMAND:
  3527.                  OVERLAY
  3528.  
  3529.             PURPOSE:
  3530.                  Performs a color selectable  overlay of one image  onto
  3531.                  another image.
  3532.  
  3533.             SYNTAX:
  3534.                  OVERLAY <buf1> <buf2> <low> <high> [outbuf]
  3535.  
  3536.             DESCRIPTION:
  3537.                  OVERLAY will  overlay each  pixel from  <buf1> that  is
  3538.                  greater than or equal to <low>  and less than or  equal
  3539.                  to <high> onto it's corresponding pixel in <buf2>.  The
  3540.                  resulting image is then placed into [outbuf].
  3541.  
  3542.                  The comparison of  <low> and <high>  against pixels  in
  3543.                  <buf1> are done on after monochrome conversion.  CImage
  3544.                  first converts <buf1> to mono to compare against  <low>
  3545.                  and <high> and  if the monochrome  value is inside  the
  3546.                  range, then the COLOR value is placed into [outbuf].
  3547.  
  3548.                  OVERLAY  is  useful  for  overlaying  an  image  of  an
  3549.                  airplane (with  a  black background)  onto  a  mountain
  3550.                  scene.
  3551.  
  3552.             NOTES:
  3553.                  The valid range for <low> and <high> is 0-255.
  3554.  
  3555.                  If [outbuf] is not given, then OVERLAY will create  the
  3556.                  first available buffer.
  3557.  
  3558.                  The "Loaded as file name" is set to OVERLAY.TGA
  3559.  
  3560.             SHORTCUT:
  3561.                  OVER
  3562.  
  3563.             SEE ALSO:
  3564.                  MERGE
  3565.  
  3566.  
  3567.  
  3568.  
  3569.  
  3570.  
  3571.  
  3572.  
  3573.  
  3574.  
  3575.  
  3576.  
  3577.  
  3578.  
  3579.  
  3580.  
  3581.                                        Page 57
  3582.  
  3583.  
  3584.  
  3585.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  3586.  
  3587.  
  3588.  
  3589.             COMMAND:
  3590.                  PAUSE
  3591.  
  3592.             PURPOSE:
  3593.                  PAUSE suspends the operation of a CImage Batch file.
  3594.  
  3595.             SYNTAX:
  3596.                  PAUSE <string>
  3597.                -or-
  3598.                  PAUSE
  3599.  
  3600.             DESCRIPTION:
  3601.                  If  <string>   exists,   then  <string>   is   printed,
  3602.                  otherwise,  PAUSE  will  display  "Press  any  key   to
  3603.                  continue...".  PAUSE will then wait for a key-press  to
  3604.                  continue.
  3605.  
  3606.             NOTES:
  3607.                  PAUSE is  often used  to break  out of  batch files  by
  3608.                  allowing the user  to press the  break key [CTRL-C]  or
  3609.                  [CTRL-BREAK].   If the  break key  sequence is  pressed
  3610.                  during a PAUSE  command, CImage will  not ask to  break
  3611.                  out of the batch file until  a key is pressed. This  is
  3612.                  the only  point in  batch file  processing when  CImage
  3613.                  will wait for a key to ask to stop processing the batch
  3614.                  file.
  3615.  
  3616.                  Currently, PAUSE echoes all text as upper-case only.
  3617.  
  3618.             SHORTCUT:
  3619.                  None.
  3620.  
  3621.             SEE ALSO:
  3622.                  BATCH ASK IF GOTO : REM PAUSE ECHO
  3623.  
  3624.  
  3625.  
  3626.  
  3627.  
  3628.  
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634.  
  3635.  
  3636.  
  3637.  
  3638.  
  3639.  
  3640.  
  3641.  
  3642.  
  3643.  
  3644.                                        Page 58
  3645.  
  3646.  
  3647.  
  3648.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  3649.  
  3650.  
  3651.  
  3652.             COMMAND:
  3653.                  PERCENT
  3654.  
  3655.             PURPOSE:
  3656.                  PERCENT is used to enable/disable the percentages  that
  3657.                  are printed as CImage processes different commands that
  3658.                  may take some time.
  3659.  
  3660.             SYNTAX:
  3661.                  PERCENT ON
  3662.                -or-
  3663.                  PERCENT OFF
  3664.  
  3665.             DESCRIPTION:
  3666.                  PERCENT ON will enable the percentages, and PERCENT OFF
  3667.                  will turn them off.  The default is ON.
  3668.  
  3669.                  Turning the  percents off  will speed  up the  time  it
  3670.                  takes to  execute commands.    This is  because  screen
  3671.                  displays are rather slow.
  3672.  
  3673.             NOTES:
  3674.                  The ONLY command that takes  some time to process  that
  3675.                  does not display percents is the PLASMA command.
  3676.  
  3677.             SHORTCUT:
  3678.                  None.
  3679.  
  3680.             SEE ALSO:
  3681.                  None.
  3682.  
  3683.  
  3684.  
  3685.  
  3686.  
  3687.  
  3688.  
  3689.  
  3690.  
  3691.  
  3692.  
  3693.  
  3694.  
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700.  
  3701.  
  3702.  
  3703.  
  3704.  
  3705.  
  3706.  
  3707.                                        Page 59
  3708.  
  3709.  
  3710.  
  3711.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  3712.  
  3713.  
  3714.  
  3715.             COMMAND:
  3716.                  PIX
  3717.  
  3718.             PURPOSE:
  3719.                  Pixellize an image.
  3720.  
  3721.             SYNTAX:
  3722.                  PIX <xres> <yres> <inbuf> [outbuf]
  3723.  
  3724.             DESCRIPTION:
  3725.                  PIX will group pixels of <xres> by <yres>, average  all
  3726.                  the pixel values in the group, and replace those pixels
  3727.                  with the averaged  color.  The  result of  which is  an
  3728.                  image that appears  as though the  resolution has  been
  3729.                  lowered and the pixels stretched to keep the same image
  3730.                  size.
  3731.  
  3732.                  PIX does NOT alter the image  resolution.  An image  of
  3733.                  100x100 being  pixelized  with  the values  of  5  (for
  3734.                  <xres>) and 5 (for <yres>) will generate an image  that
  3735.                  appears to  have a  resolution of  20x20, however,  the
  3736.                  resolution is actually 100x100.
  3737.  
  3738.             NOTES:
  3739.                  If [outbuf]  is not  given, then  <inbuf> contains  the
  3740.                  result.
  3741.  
  3742.             SHORTCUT:
  3743.                  None.
  3744.  
  3745.             SEE ALSO:
  3746.                  None.
  3747.  
  3748.  
  3749.  
  3750.  
  3751.  
  3752.  
  3753.  
  3754.  
  3755.  
  3756.  
  3757.  
  3758.  
  3759.  
  3760.  
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.  
  3767.  
  3768.  
  3769.  
  3770.                                        Page 60
  3771.  
  3772.  
  3773.  
  3774.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  3775.  
  3776.  
  3777.  
  3778.             COMMAND:
  3779.                  PLASMA
  3780.  
  3781.             PURPOSE:
  3782.                  Creates a "plasma" type fractal image.
  3783.  
  3784.             SYNTAX:
  3785.                  PLASMA <xres> <yres> <grain> [outbuf]
  3786.  
  3787.             DESCRIPTION:
  3788.                  PLASMA will create a  "plasma" fractal image of  <xres>
  3789.                  by <yres>  using  <grain>  and place  the  result  into
  3790.                  [outbuf].
  3791.  
  3792.                  Plasma fractals look like  clouds.  The larger  <grain>
  3793.                  is, the denser the clouds.  A typical value for  plasma
  3794.                  is 3.
  3795.  
  3796.             NOTES:
  3797.                  Valid range for <grain> is 0.001 - 100.0.
  3798.  
  3799.                  If [outbuf] is not given,  then PLASMA will create  the
  3800.                  first available buffer.
  3801.  
  3802.                  PLASMA is  the  only  command  that  does  not  display
  3803.                  percentages as it executes.
  3804.  
  3805.                  The "Loaded as file name" is set to PLASMA.TGA
  3806.  
  3807.             SHORTCUT:
  3808.                  None.
  3809.  
  3810.             SEE ALSO:
  3811.                  None.
  3812.  
  3813.  
  3814.  
  3815.  
  3816.  
  3817.  
  3818.  
  3819.  
  3820.  
  3821.  
  3822.  
  3823.  
  3824.  
  3825.  
  3826.  
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832.  
  3833.                                        Page 61
  3834.  
  3835.  
  3836.  
  3837.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  3838.  
  3839.  
  3840.  
  3841.             COMMAND:
  3842.                  PMOD
  3843.  
  3844.             PURPOSE:
  3845.                  Sets the prompt modifier.
  3846.  
  3847.             SYNTAX:
  3848.                  PMOD [modifier]
  3849.  
  3850.             DESCRIPTION:
  3851.                  The prompt modifier  is displayed  to the  left of  the
  3852.                  prompt so  that  the  user  can  tell  when  CImage  is
  3853.                  running.  PMOD will allow the user to change the prompt
  3854.                  modifier.
  3855.  
  3856.             NOTES:
  3857.                  If [modifier] is not given, then PMOD will display  the
  3858.                  current prompt modifier.
  3859.  
  3860.             SHORTCUT:
  3861.                  None.
  3862.  
  3863.             SEE ALSO:
  3864.                  None.
  3865.  
  3866.  
  3867.  
  3868.  
  3869.  
  3870.  
  3871.  
  3872.  
  3873.  
  3874.  
  3875.  
  3876.  
  3877.  
  3878.  
  3879.  
  3880.  
  3881.  
  3882.  
  3883.  
  3884.  
  3885.  
  3886.  
  3887.  
  3888.  
  3889.  
  3890.  
  3891.  
  3892.  
  3893.  
  3894.  
  3895.  
  3896.                                        Page 62
  3897.  
  3898.  
  3899.  
  3900.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  3901.  
  3902.  
  3903.  
  3904.             COMMAND:
  3905.                  REM
  3906.  
  3907.             PURPOSE:
  3908.                  During the  execution  of  an CImage  batch  file,  REM
  3909.                  displays the remarks that are on  the same line as  the
  3910.                  REM command in that batch file.
  3911.  
  3912.             SYNTAX:
  3913.                  REM [comment]
  3914.  
  3915.             DESCRIPTION:
  3916.                  The [comment] is  not executed, rather  it is used  for
  3917.                  making notes inside batch files to it readers from it's
  3918.                  author.  It can also be used to display information  to
  3919.                  the screen as a batch file executes.
  3920.  
  3921.             NOTES:
  3922.                  If the ECHO is  off, then the REM  command line is  not
  3923.                  displayed.
  3924.  
  3925.             SHORTCUT:
  3926.                  None.
  3927.  
  3928.             SEE ALSO:
  3929.                  BATCH ASK IF GOTO : PAUSE ECHO
  3930.  
  3931.  
  3932.  
  3933.  
  3934.  
  3935.  
  3936.  
  3937.  
  3938.  
  3939.  
  3940.  
  3941.  
  3942.  
  3943.  
  3944.  
  3945.  
  3946.  
  3947.  
  3948.  
  3949.  
  3950.  
  3951.  
  3952.  
  3953.  
  3954.  
  3955.  
  3956.  
  3957.  
  3958.  
  3959.                                        Page 63
  3960.  
  3961.  
  3962.  
  3963.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  3964.  
  3965.  
  3966.  
  3967.             COMMAND:
  3968.                  SAVE
  3969.  
  3970.             PURPOSE:
  3971.                  Save an image buffer.
  3972.  
  3973.             SYNTAX:
  3974.                  SAVE <buff> [filename]
  3975.  
  3976.             DESCRIPTION:
  3977.                  SAVE will save <buff> to [filename].
  3978.  
  3979.             NOTES:
  3980.                  If [filename] is not given, then SAVE will get the name
  3981.                  from the last saved  name for that  buffer (see the  LC
  3982.                  command for more  information on looking  for the  last
  3983.                  saved name).  If there is no last saved name, then SAVE
  3984.                  will save  the  buffer  under  the  name  that  it  was
  3985.                  originally loaded (or created).
  3986.  
  3987.                  Files are overwritten without verification.
  3988.  
  3989.                  The file's extension is used to decide the file's type.
  3990.                  Once the file type is obtained from the extension, SAVE
  3991.                  will create the file, and save it accordingly.
  3992.  
  3993.                  Current supported file types are:
  3994.                    IMG - VIVID/BOB format
  3995.                    GIF - GIF87a
  3996.                    TGA - Only type 2, uncompressed
  3997.                    BMP - All versions (Windows)
  3998.                    IPI - CImage's internal format (See HELP IPI for
  3999.                          details on format)
  4000.  
  4001.                  Also note that all files written out by CImage are  24-
  4002.                  bit, non-compressed  images (except  .GIF files,  which
  4003.                  are 8-bit compressed  images), and  Targa files  (.TGA)
  4004.                  are written in Top-down format only.
  4005.  
  4006.             SHORTCUT:
  4007.                  None.
  4008.  
  4009.             SEE ALSO:
  4010.                  LOAD MERGE LB
  4011.  
  4012.  
  4013.  
  4014.  
  4015.  
  4016.  
  4017.  
  4018.  
  4019.  
  4020.  
  4021.  
  4022.                                        Page 64
  4023.  
  4024.  
  4025.  
  4026.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  4027.  
  4028.  
  4029.  
  4030.             COMMAND:
  4031.                  SET
  4032.  
  4033.             PURPOSE:
  4034.                  Set an CImage internal environment variable.
  4035.  
  4036.             SYNTAX:
  4037.                  SET [var] [value]
  4038.  
  4039.             DESCRIPTION:
  4040.                  SET  will  define   the  CImage  internal   environment
  4041.                  variable [var] to  be [value].   Environment  variables
  4042.                  are similar  to  macros  except  that  macros  must  be
  4043.                  separated from other  words on  the command  line by  a
  4044.                  space,  and  environment   variables  don't,   however,
  4045.                  environment variables require a '%' sign on either side
  4046.                  of them for them to be resolved properly.
  4047.  
  4048.                  Environment variables  are  usually  used  as  settings
  4049.                  (like the  path to  your images)  to be  inserted  into
  4050.                  command line.  You  can define almost  any string to  a
  4051.                  variable.  These environment  variable are accessed  as
  4052.                  %<var>%.
  4053.  
  4054.                  If you define  "PTH" to be  "C:\IMAGES\".  Then,  every
  4055.                  time you type "%PTH%" on the command line, CImage  will
  4056.                  interpret it as: "C:\IMAGES\"
  4057.  
  4058.                  Say you type the line:  "LOAD %PTH%PICTURE.GIF".   This
  4059.                  line     will     get     interpreted     as      "LOAD
  4060.                  C:\IMAGES\PICTURE.GIF".
  4061.  
  4062.                  Like macros, environment  variables may also  reference
  4063.                  each other.
  4064.  
  4065.             NOTES:
  4066.                  Macros  may   reference  environment   variables,   but
  4067.                  environment variables may not reference macros.
  4068.  
  4069.                  If [value] is not given, then the [var] will be removed
  4070.                  from the environment variable table.
  4071.  
  4072.                  If [var] and [value] are not given, then SET will  list
  4073.                  all currently defined environment variables.
  4074.  
  4075.             SHORTCUT:
  4076.                  None.
  4077.  
  4078.             SEE ALSO:
  4079.                  MACRO
  4080.  
  4081.  
  4082.  
  4083.  
  4084.  
  4085.                                        Page 65
  4086.  
  4087.  
  4088.  
  4089.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  4090.  
  4091.  
  4092.  
  4093.             COMMAND:
  4094.                  SHOW
  4095.  
  4096.             PURPOSE:
  4097.                  Display an image buffer.
  4098.  
  4099.             SYNTAX:
  4100.                  SHOW [buf]
  4101.  
  4102.             DESCRIPTION:
  4103.                  SHOW will  display,  in  graphics mode,  the  image  in
  4104.                  [buf].
  4105.  
  4106.                  If color reduction  is needed, then  SHOW will  perform
  4107.                  the color reduction before displaying the image.
  4108.  
  4109.                  SHOW will use  the information  in VMODE  to pick  what
  4110.                  type of display mode to enter  to show [buf].  See  the
  4111.                  VMODE command  for more  information on  the different
  4112.                  graphics configurations available from CImage.
  4113.  
  4114.                  Once the image  is displayed, SHOW  will beep, and  any
  4115.                  key will  return  the user  to  the text  mode  command
  4116.                  prompt.
  4117.  
  4118.             NOTES:
  4119.                  If [buf] is not  given, then SHOW  will show the  first
  4120.                  available buffer (if one exists).
  4121.  
  4122.                  The modes 11-13, 15 and 17 may take a few seconds  once
  4123.                  they enter graphics mode to begin displaying the  image
  4124.                  to finalize color co ordination.  This is  not true for
  4125.                  modes with 32K colors or more.
  4126.  
  4127.                  VESA is the preferred graphics configuration to run.
  4128.  
  4129.                  CImage does  not  support  modes  with  less  than  256
  4130.                  colors.
  4131.  
  4132.             SHORTCUT:
  4133.                  None.
  4134.  
  4135.             SEE ALSO:
  4136.                  VESAINFO BIOSINFO VMODE VCOLORS CRES
  4137.  
  4138.  
  4139.  
  4140.  
  4141.  
  4142.  
  4143.  
  4144.  
  4145.  
  4146.  
  4147.  
  4148.                                        Page 66
  4149.  
  4150.  
  4151.  
  4152.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  4153.  
  4154.  
  4155.  
  4156.             COMMAND:
  4157.                  SUBTRACT
  4158.  
  4159.             PURPOSE:
  4160.                  Subtract the contents of two image buffers.
  4161.  
  4162.             SYNTAX:
  4163.                  SUBTRACT <buf1> <buf2> [outbuf]
  4164.  
  4165.             DESCRIPTION:
  4166.                  SUBTRACT will  subtract, pixel  by pixel,  each of  the
  4167.                  red, blue and green components of <buf1> and <buf2> and
  4168.                  place the result into [outbuf].
  4169.  
  4170.             NOTES:
  4171.                  If [outbuf]  is not  given,  then <buf1>  contains  the
  4172.                  result.
  4173.  
  4174.                  Upon subtracting the components, if the two  components
  4175.                  subtracted are less than 0, then the component value is
  4176.                  clipped to 0.
  4177.  
  4178.             SHORTCUT:
  4179.                  SUB
  4180.  
  4181.             SEE ALSO:
  4182.                  ADD MULTIPLY DIVIDE
  4183.  
  4184.  
  4185.  
  4186.  
  4187.  
  4188.  
  4189.  
  4190.  
  4191.  
  4192.  
  4193.  
  4194.  
  4195.  
  4196.  
  4197.  
  4198.  
  4199.  
  4200.  
  4201.  
  4202.  
  4203.  
  4204.  
  4205.  
  4206.  
  4207.  
  4208.  
  4209.  
  4210.  
  4211.                                        Page 67
  4212.  
  4213.  
  4214.  
  4215.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  4216.  
  4217.  
  4218.  
  4219.             COMMAND:
  4220.                  TERRAIN
  4221.  
  4222.             PURPOSE:
  4223.                  Generate a BOB (ray tracer) compatible terrain map.
  4224.  
  4225.             SYNTAX:
  4226.                  TERRAIN <buff> <range> <filename> <low> [color]
  4227.  
  4228.             DESCRIPTION:
  4229.                  TERRAIN will generate a .B file for the ray tracer  BOB
  4230.                  that contains  a  terrain  map  of  triangles  for  the
  4231.                  current image using the intensity of each pixel for the
  4232.                  height of the triangle points.
  4233.  
  4234.                  TERRAIN scans  <buff>,  and  at each  pixel  it  scales
  4235.                  [color] to <range>, then  compares the value to  <low>,
  4236.                  which is the "water  level", and if  the value is  less
  4237.                  than <low>,  the  value gets  clipped  to <low>.    The
  4238.                  triangle is then written to <filename>.
  4239.  
  4240.                  This command  was  meant  to work  primarily  with  the
  4241.                  PLASMA images for terrain  generation, however, it  can
  4242.                  be used with any image.
  4243.  
  4244.             NOTES:
  4245.                  <range> must be greater than 0.  Valid range for  <low>
  4246.                  is 0 (flat)  to 255 (full  height).   Valid values  for
  4247.                  [color] are R, G, B or M. These specify to use the  Red
  4248.                  element, Blue  element,  Green  element  or  the  pixel
  4249.                  converted to Monochrome for  the pixel value  (triangle
  4250.                  height).
  4251.  
  4252.                  If  [color]  is  not  given,  then  TERRAIN  will   use
  4253.                  Monochrome conversion.
  4254.  
  4255.                  Images of 640x480 can create VERY LARGE output files.
  4256.  
  4257.             SHORTCUT:
  4258.                  TERR
  4259.  
  4260.             SEE ALSO:
  4261.                  None.
  4262.  
  4263.  
  4264.  
  4265.  
  4266.  
  4267.  
  4268.  
  4269.  
  4270.  
  4271.  
  4272.  
  4273.  
  4274.                                        Page 68
  4275.  
  4276.  
  4277.  
  4278.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  4279.  
  4280.  
  4281.  
  4282.             COMMAND:
  4283.                  VCOLORS
  4284.  
  4285.             PURPOSE:
  4286.                  Set the  number  of  colors that  the  video  card  can
  4287.                  display.
  4288.  
  4289.             SYNTAX:
  4290.                  VCOLORS [val]
  4291.  
  4292.             DESCRIPTION:
  4293.                  VCOLORS tells CImage how many colors the video card can
  4294.                  display simultaneously.  CImage needs to know how many
  4295.                  colors the  video  card  can display  so  that  it  may
  4296.                  properly reduce  the internal  24-bit images  to  [val]
  4297.                  colors for displaying.
  4298.  
  4299.                  This value is set by the VESAINFO, VMODE, and  BIOSINFO
  4300.                  functions.
  4301.  
  4302.             NOTES:
  4303.                  If [val] is  not given, then  VCOLORS will display  the
  4304.                  current setting.
  4305.  
  4306.                  CImage does  not  support  modes  with  less  than  256
  4307.                  colors.
  4308.  
  4309.             SHORTCUT:
  4310.                  None.
  4311.  
  4312.             SEE ALSO:
  4313.                  VESAINFO BIOSINFO VMODE CRES SHOW
  4314.  
  4315.  
  4316.  
  4317.  
  4318.  
  4319.  
  4320.  
  4321.  
  4322.  
  4323.  
  4324.  
  4325.  
  4326.  
  4327.  
  4328.  
  4329.  
  4330.  
  4331.  
  4332.  
  4333.  
  4334.  
  4335.  
  4336.  
  4337.                                        Page 69
  4338.  
  4339.  
  4340.  
  4341.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  4342.  
  4343.  
  4344.  
  4345.             COMMAND:
  4346.                  VESAINFO
  4347.  
  4348.             PURPOSE:
  4349.                  Set or display the VESA graphics configuration.
  4350.  
  4351.             SYNTAX:
  4352.                  VESAINFO [mode]
  4353.  
  4354.             DESCRIPTION:
  4355.                  VESAINFO will set the current VESA configuration to  be
  4356.                  used  for  displaying  image  buffers  using  the  SHOW
  4357.                  command.
  4358.  
  4359.                  Users must also  perform a "VMODE  VESA" to enable  the
  4360.                  VESA mode for displaying image buffers.  See the  VMODE
  4361.                  command for more information on setting the mode.
  4362.  
  4363.                  VESA  is  a  great  standard  for  super-VGA  displays.
  4364.                  CImage's developers  support VESA  and hopes  that  you
  4365.                  will use this  configuration above BIOS  or any of  the
  4366.                  built-in modes.
  4367.  
  4368.             NOTES:
  4369.                  The VESA drivers are not  included with CImage.   These
  4370.                  drivers  can   be   obtained  from   you   video   card
  4371.                  manufacturer if they were  not included with your  card
  4372.                  upon purchase.
  4373.  
  4374.                  If [mode] is not given, then VESAINFO will display  the
  4375.                  following information  (this is  from my  system,  VESA
  4376.                  version 1.2 running a Diamond Speed Star 24X):
  4377.  
  4378.                       Available modes are marked with an asterisk (*):
  4379.                             6Ah -  800 x  600  16 colors
  4380.                          * 100h -  640 x  400 256 colors
  4381.                          * 101h -  640 x  480 256 colors
  4382.                          * 102h -  800 x  600  16 colors
  4383.                          * 103h -  800 x  600 256 colors
  4384.                          * 104h - 1024 x  768  16 colors
  4385.                          * 105h - 1024 x  768 256 colors
  4386.                          * 106h - 1280 x 1024  16 colors
  4387.                            107h - 1280 x 1024 256 colors
  4388.                            108h - TEXT MODE...unusable
  4389.                          * 109h - TEXT MODE...unusable
  4390.                          * 10Ah - TEXT MODE...unusable
  4391.                          * 10Bh - TEXT MODE...unusable
  4392.                            10Ch - TEXT MODE...unusable
  4393.                          * 10Dh -  320 x  200 32K colors
  4394.                            10Eh -  320 x  200 64K colors
  4395.                            10Fh -  320 x  200 16M colors
  4396.                          * 110h -  640 x  480 32K colors
  4397.                            111h -  640 x  480 64K colors
  4398.  
  4399.  
  4400.                                        Page 70
  4401.  
  4402.  
  4403.  
  4404.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  4405.  
  4406.  
  4407.                            112h -  640 x  480 16M colors
  4408.                          * 113h -  800 x  600 32K colors
  4409.                            114h -  800 x  600 64K colors
  4410.                            115h -  800 x  600 16M colors
  4411.                            116h - 1024 x  768 32K colors
  4412.                            117h - 1024 x  768 64K colors
  4413.                            118h - 1024 x  768 16M colors
  4414.                            119h - 1280 x 1024 32K colors
  4415.                            11Ah - 1280 x 1024 64K colors
  4416.                            11Bh - 1280 x 1024 16M colors
  4417.  
  4418.                       Current Settings:
  4419.  
  4420.                                VESA version:  1.2
  4421.                                    OEM name:  Western Digital Inc V1.2
  4422.                             VESA video mode:  113h (275)
  4423.                                  Resolution:  800x600
  4424.                          Displayable colors:  32768 (15 Bits per pixel)
  4425.                             Mode attributes:  [Supported] [No BIOS
  4426.                                                Output] [Color]
  4427.                                                [Graphics]
  4428.                         Window A attributes:  [Supported] [Readable]
  4429.                                                [Writable]
  4430.                         Window B attributes:  [Not Supported]
  4431.                        Granularity/Win size:  4K/64K
  4432.                         Window segments A/B:  A000h/A800h
  4433.                        Window pos. function:  0623:05EEh
  4434.                          Bytes per scanline:  1600
  4435.                              Character size:  0x0
  4436.                          # of memory planes:  1
  4437.                             Number of banks:  1
  4438.                           Memory model type:  YUV
  4439.                                   Bank size:  0K
  4440.                                 Image pages:  1
  4441.                          Red size/field pos:  5/10
  4442.                        Green size/field pos:  5/5
  4443.                         Blue size/field pos:  5/0
  4444.                           Direct color mode:  [Color ramp fixed] [Bits
  4445.                                                are usable]
  4446.  
  4447.                  VESA is the preferred graphics configuration to run.
  4448.  
  4449.                  CImage does  not  support  modes  with  less  than  256
  4450.                  colors.
  4451.  
  4452.             SHORTCUT:
  4453.                  VESA
  4454.  
  4455.             SEE ALSO:
  4456.                  BIOSINFO VMODE VCOLORS CRES SHOW
  4457.  
  4458.  
  4459.  
  4460.  
  4461.  
  4462.  
  4463.                                        Page 71
  4464.  
  4465.  
  4466.  
  4467.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  4468.  
  4469.  
  4470.  
  4471.             COMMAND:
  4472.                  VMODE
  4473.  
  4474.             PURPOSE:
  4475.                  Sets the video  mode to  be used  for displaying  image
  4476.                  buffers.
  4477.  
  4478.             SYNTAX:
  4479.                  VMODE [mode]
  4480.  
  4481.             DESCRIPTION:
  4482.                  VMODE tells  CImage what  mode  to use  for  displaying
  4483.                  image  buffers.  Currently,  the  following  modes  are
  4484.                  supported:
  4485.                      320 x 200, 256 color
  4486.                      640 x 400, 256 color
  4487.                      640 x 480, 256 color
  4488.                      800 x 600, 256 color
  4489.                     1024 x 768, 256 color
  4490.                     BIOS mode
  4491.                     VESA mode
  4492.  
  4493.                  If BIOS is selected, then CImage uses the current  BIOS
  4494.                  information for it's  display mode.   See the  BIOSINFO
  4495.                  command  for   more   information  on   BIOS   graphics
  4496.                  configuration.
  4497.  
  4498.                  If VESA is selected, then CImage uses the current  VESA
  4499.                  information for it's  display mode.   See the  VESAINFO
  4500.                  command  for   more   information  on   VESA   graphics
  4501.                  configuration.
  4502.  
  4503.             NOTES:
  4504.                  If [mode] is  not given,  then VMODE  will display  the
  4505.                  current mode's information, and the available modes.
  4506.  
  4507.                  Valid values for [val] are:
  4508.                     11.......320 x 200, 256 color
  4509.                     12.......640 x 400, 256 color
  4510.                     13.......640 x 480, 256 color
  4511.                     15.......800 x 600, 256 color
  4512.                     17......1024 x 768, 256 color
  4513.                     BIOS....BIOS mode
  4514.                     VESA....VESA mode
  4515.  
  4516.                  VESA is the preferred graphics configuration to run.
  4517.  
  4518.                  CImage does  not  support  modes  with  less  than  256
  4519.                  colors.
  4520.  
  4521.             SHORTCUT:
  4522.                  None.
  4523.  
  4524.  
  4525.  
  4526.                                        Page 72
  4527.  
  4528.  
  4529.  
  4530.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  4531.  
  4532.  
  4533.             SEE ALSO:
  4534.                  VESAINFO BIOSINFO VCOLORS CRES SHOW
  4535.  
  4536.  
  4537.  
  4538.  
  4539.  
  4540.  
  4541.  
  4542.  
  4543.  
  4544.  
  4545.  
  4546.  
  4547.  
  4548.  
  4549.  
  4550.  
  4551.  
  4552.  
  4553.  
  4554.  
  4555.  
  4556.  
  4557.  
  4558.  
  4559.  
  4560.  
  4561.  
  4562.  
  4563.  
  4564.  
  4565.  
  4566.  
  4567.  
  4568.  
  4569.  
  4570.  
  4571.  
  4572.  
  4573.  
  4574.  
  4575.  
  4576.  
  4577.  
  4578.  
  4579.  
  4580.  
  4581.  
  4582.  
  4583.  
  4584.  
  4585.  
  4586.  
  4587.  
  4588.  
  4589.                                        Page 73
  4590.  
  4591.  
  4592.  
  4593.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  4594.  
  4595.  
  4596.                                  FUTURE ENHANCEMENTS
  4597.  
  4598.             o    Add ERRORLEVEL to internal CImage commands where
  4599.                  needed.
  4600.  
  4601.             o    FOR command
  4602.  
  4603.             o    Image Functions:
  4604.                       Morphing (that's REAL MORPHING, not a fake)
  4605.                       Resize (interpolate)
  4606.                       Image combination (average of x number of images)
  4607.                       Rotate (on 90 degree boundaries)
  4608.  
  4609.             o    More Image Filters!
  4610.                       Sobel (strength & orientation)
  4611.                       Robert's edge (accurate & fast)
  4612.  
  4613.             o    Add other file formats:
  4614.                       Targa (versions of the Targa file that are not
  4615.                            currently supported)
  4616.                       TIFF
  4617.                       Other versions of GIF
  4618.  
  4619.  
  4620.  
  4621.  
  4622.  
  4623.  
  4624.  
  4625.  
  4626.  
  4627.  
  4628.  
  4629.  
  4630.  
  4631.  
  4632.  
  4633.  
  4634.  
  4635.  
  4636.  
  4637.  
  4638.  
  4639.  
  4640.  
  4641.  
  4642.  
  4643.  
  4644.  
  4645.  
  4646.  
  4647.  
  4648.  
  4649.  
  4650.  
  4651.  
  4652.                                        Page 74
  4653.  
  4654.  
  4655.  
  4656.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  4657.  
  4658.  
  4659.                              CONTACTING CUSTOMER SUPPORT
  4660.  
  4661.             I'm available in the evenings, I have the standard 9-5 job
  4662.             (eastern time).  If you need to reach me during the day, you
  4663.             can do so by calling and leaving a message.  I call in to my
  4664.             voice mail about three times per day, however, on hectic
  4665.             days, it's not so easy, and I may not get any messages at
  4666.             all.
  4667.  
  4668.             Tech Support is available for all registered users for one
  4669.             full year following the purchase.  For non-registered users
  4670.             (and registered users over one year), tech support is not
  4671.             officially available.  But if I'm not swamped, I'll try to
  4672.             get back to you.  Registered users over one year have
  4673.             priority over non-registered users.  So, please state your
  4674.             status.  It can be verified on computer.
  4675.  
  4676.             To contact me, just call (313) 941-9223.
  4677.  
  4678.             You may also mail your support questions to:
  4679.  
  4680.                  Paul D. Nettle
  4681.                  9668 Washington St.
  4682.                  Romulus, MI  48174
  4683.  
  4684.             My phone number and address are for support, comments,
  4685.             suggestions, questions, registration information, and of
  4686.             course, orders.
  4687.  
  4688.  
  4689.  
  4690.  
  4691.  
  4692.  
  4693.  
  4694.  
  4695.  
  4696.  
  4697.  
  4698.  
  4699.  
  4700.  
  4701.  
  4702.  
  4703.  
  4704.  
  4705.  
  4706.  
  4707.  
  4708.  
  4709.  
  4710.  
  4711.  
  4712.  
  4713.  
  4714.  
  4715.                                        Page 75
  4716.  
  4717.  
  4718.  
  4719.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  4720.  
  4721.  
  4722.                                 ORDERING INFORMATION
  4723.  
  4724.  
  4725.             To order a copy of The Complete Image, just print out the
  4726.             REGISTR.FRM, fill it in, and send it with you check or money
  4727.             order for $35.00.
  4728.  
  4729.  
  4730.             What you will get when you register:
  4731.  
  4732.             o    The registered version of CImage on disk (your choice
  4733.                  of disk format -- 1.2M or 1.4M).
  4734.  
  4735.             o    A printed manual.
  4736.  
  4737.             o    The next update of CImage -- free of charge (Including
  4738.                  printed documentation).
  4739.  
  4740.             o    Peace of mind.
  4741.  
  4742.  
  4743.             Differences between non-registered and registered users:
  4744.  
  4745.             o    Registered versions don't display the registration
  4746.                  notice upon startup of CImage.
  4747.  
  4748.             o    Registered versions are marked with an "r" after the
  4749.                  version number in the title rather than a "u".
  4750.  
  4751.             o    Registered users are allowed free technical support
  4752.                  priority via phone or by mail.  Non-registered users
  4753.                  are given no official technical support.  (see
  4754.                  Contacting Customer Support).
  4755.  
  4756.  
  4757.  
  4758.  
  4759.  
  4760.  
  4761.  
  4762.  
  4763.  
  4764.  
  4765.  
  4766.  
  4767.  
  4768.  
  4769.  
  4770.  
  4771.  
  4772.  
  4773.  
  4774.  
  4775.  
  4776.  
  4777.  
  4778.                                        Page 76
  4779.  
  4780.